Documentation
¶
Index ¶
- type OAuth2OIDCService
- func (osvc *OAuth2OIDCService) Claims(ctx context.Context, code string) (models.Tokens, error)
- func (osvc *OAuth2OIDCService) Create(cc models.CustomClaims) (models.CustomClaims, error)
- func (osvc *OAuth2OIDCService) Decode(tokenString string) (models.UserInfo, error)
- func (osvc *OAuth2OIDCService) GetOIDCProviderURL() (string, error)
- func (osvc *OAuth2OIDCService) IsFlowSecure(state string, token models.Tokens) (bool, error)
- type OIDCService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OAuth2OIDCService ¶
type OAuth2OIDCService struct {
// contains filtered or unexported fields
}
OAuth2OIDCService defines the OAuth2 OIDC Service struct.
func (*OAuth2OIDCService) Claims ¶
Claims creates claims tokens based on the auth code returned from the OIDC provider.
func (*OAuth2OIDCService) Create ¶
func (osvc *OAuth2OIDCService) Create(cc models.CustomClaims) (models.CustomClaims, error)
Create a new JWT token based on Custom Claims models.
func (*OAuth2OIDCService) Decode ¶
func (osvc *OAuth2OIDCService) Decode(tokenString string) (models.UserInfo, error)
Decode validates the token and returns the claims.
func (*OAuth2OIDCService) GetOIDCProviderURL ¶
func (osvc *OAuth2OIDCService) GetOIDCProviderURL() (string, error)
GetOIDCProviderURL gets OIDC provider URL from the OAuth2 configuration.
func (*OAuth2OIDCService) IsFlowSecure ¶
IsFlowSecure ensures the flow is secure and then, returns a JWT token.
type OIDCService ¶
type OIDCService interface { GetOIDCProviderURL() (string, error) Claims(ctx context.Context, code string) (models.Tokens, error) IsFlowSecure(state string, token models.Tokens) (bool, error) Create(cc models.CustomClaims) (models.CustomClaims, error) Decode(tokenString string) (models.UserInfo, error) }
OIDCService defines a interface for OIDC Service.
func NewOAuth2OIDCService ¶
func NewOAuth2OIDCService(logger logging.Logger, configuration configurations.OIDCServiceConfiguration, client clients.OIDCClient, sessionStorage *storages.SessionStorage) OIDCService
NewOAuth2OIDCService creates a new OAuth2 OIDC Service struct.
Click to show internal directories.
Click to hide internal directories.