credentials

package
v0.0.0-...-ca0f7d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAccessToken

func CreateAccessToken(session models.Session, tokenSecretKey []byte) (string, error)

func CreateRefreshToken

func CreateRefreshToken(session models.Session, tokenSecretKey []byte) (string, error)

func CreateSessionTokens

func CreateSessionTokens(
	session models.Session,
	accessTokenSecretKey, refreshTokenSecretKey []byte,
) (*models.SessionTokens, error)

Types

type AccessTokenInfo

type AccessTokenInfo struct {
	AccessToken uuid.UUID
	AccountID   uuid.UUID
	SessionID   uuid.UUID
}

func ParseRawAccessToken

func ParseRawAccessToken(rawAccessToken string, decodeKey []byte) (*AccessTokenInfo, error)

type RefreshTokenInfo

type RefreshTokenInfo struct {
	RefreshToken uuid.UUID
}

func ParseRawRefreshToken

func ParseRawRefreshToken(rawRefreshToken string, decodeKey []byte) (*RefreshTokenInfo, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL