Documentation ¶
Index ¶
- Constants
- type AccessTokenRequest
- type Config
- func (c Config) GenerateAccessToken(req AccessTokenRequest) (string, error)
- func (c Config) GenerateJWKS() PublicKeysData
- func (c Config) GenerateRefreshToken(req RefreshTokenRequest) (string, error)
- func (c Config) ParseAccessToken(tokenString string) (*accessToken, error)
- func (c Config) ParseAccessTokenByJWK(tokenString string, publicKeysData PublicKeysData) (*accessToken, error)
- func (c Config) ParseRefreshToken(tokenString string) (*refreshToken, error)
- func (c Config) ParseToken(tokenString string) (*token, error)
- type ConfigAuthorize
- type PublicKeysData
- type RefreshTokenRequest
Constants ¶
View Source
const ( DefaultPrivateFileRSA = "./configs/resources/private_key.pem" DefaultPublicFileRSA = "./configs/resources/public_key.pub" DefaultKeyIdentifier = "236c88d15b514cd3b73bd6b4c1fbe177" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenRequest ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func InitConfig ¶
func (Config) GenerateAccessToken ¶
func (c Config) GenerateAccessToken(req AccessTokenRequest) (string, error)
func (Config) GenerateJWKS ¶
func (c Config) GenerateJWKS() PublicKeysData
func (Config) GenerateRefreshToken ¶
func (c Config) GenerateRefreshToken(req RefreshTokenRequest) (string, error)
func (Config) ParseAccessToken ¶
func (Config) ParseAccessTokenByJWK ¶
func (c Config) ParseAccessTokenByJWK(tokenString string, publicKeysData PublicKeysData) (*accessToken, error)
func (Config) ParseRefreshToken ¶
func (Config) ParseToken ¶
type ConfigAuthorize ¶
type ConfigAuthorize struct {
// contains filtered or unexported fields
}
func InitConfigAuthorize ¶
func (ConfigAuthorize) FetchCacheableJWK ¶
func (c ConfigAuthorize) FetchCacheableJWK() (*PublicKeysData, error)
func (ConfigAuthorize) FetchJWK ¶
func (c ConfigAuthorize) FetchJWK() (*PublicKeysData, error)
type PublicKeysData ¶
type PublicKeysData struct {
Keys []keyData `json:"keys"`
}
func (PublicKeysData) ToRaw ¶
func (p PublicKeysData) ToRaw() []byte
Click to show internal directories.
Click to hide internal directories.