Documentation ¶
Index ¶
- Variables
- func ComparePassword(raw string, encoded string) (bool, error)
- func DecodePublicKey() (*ecdsa.PublicKey, string, error)
- func HashPassword(raw string) (string, error)
- type JWT
- func (j *JWT) GenerateAccessToken(uid typedef.UserID, claims map[string]any) (string, error)
- func (j *JWT) GenerateIDToken(uid typedef.UserID, audiences []string, authTime time.Time, nonce string) (string, error)
- func (j *JWT) GenerateRefreshToken(uid typedef.UserID, claims map[string]any) (string, error)
- func (j *JWT) Parse(token string) (jwt.Token, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var RawCookieBlockKey []byte
View Source
var RawCookieHashKey []byte
Functions ¶
func HashPassword ¶
Types ¶
type JWT ¶
type JWT struct {
// contains filtered or unexported fields
}
func (*JWT) GenerateAccessToken ¶
func (*JWT) GenerateIDToken ¶
func (j *JWT) GenerateIDToken(uid typedef.UserID, audiences []string, authTime time.Time, nonce string) (string, error)
GenerateIDToken generates ID token and returns it as string. The detail of ID token is described here: https://openid-foundation-japan.github.io/openid-connect-core-1_0.ja.html#IDToken
func (*JWT) GenerateRefreshToken ¶
Click to show internal directories.
Click to hide internal directories.