Documentation
¶
Index ¶
- Constants
- func ACRValuesToBusiness(values []string) []model.LevelOfAssurance
- func AMRFromMFAType(mfaType model.MFAType) string
- func AuthRequestFromBusiness(authReq *model.AuthRequest) (_ op.AuthRequest, err error)
- func ClientFromBusiness(app *model.ApplicationView, defaultLoginURL string, ...) (op.Client, error)
- func CodeChallengeToBusiness(challenge string, method oidc.CodeChallengeMethod) *model.OIDCCodeChallenge
- func CodeChallengeToOIDC(challenge *model.OIDCCodeChallenge) *oidc.CodeChallenge
- func CreateAuthRequestToBusiness(ctx context.Context, authReq *oidc.AuthRequest, userAgentID, userID string) *model.AuthRequest
- func HttpHeadersFromContext(ctx context.Context) (userAgent, acceptLang string)
- func IpFromContext(ctx context.Context) net.IP
- func NewProvider(ctx context.Context, config OPHandlerConfig, repo repository.Repository, ...) op.OpenIDProvider
- func ParseBrowserInfoFromContext(ctx context.Context) *model.BrowserInfo
- func PromptToBusiness(prompt oidc.Prompt) model.Prompt
- func ResponseTypeToBusiness(responseType oidc.ResponseType) model.OIDCResponseType
- func ResponseTypeToOIDC(responseType model.OIDCResponseType) oidc.ResponseType
- func UILocalesToBusiness(tags []language.Tag) []string
- type AuthRequest
- func (a *AuthRequest) Done() bool
- func (a *AuthRequest) GetACR() string
- func (a *AuthRequest) GetAMR() []string
- func (a *AuthRequest) GetAudience() []string
- func (a *AuthRequest) GetAuthTime() time.Time
- func (a *AuthRequest) GetClientID() string
- func (a *AuthRequest) GetCodeChallenge() *oidc.CodeChallenge
- func (a *AuthRequest) GetID() string
- func (a *AuthRequest) GetNonce() string
- func (a *AuthRequest) GetRedirectURI() string
- func (a *AuthRequest) GetResponseType() oidc.ResponseType
- func (a *AuthRequest) GetScopes() []string
- func (a *AuthRequest) GetState() string
- func (a *AuthRequest) GetSubject() string
- type Client
- func (c *Client) AccessTokenLifetime() time.Duration
- func (c *Client) AccessTokenType() op.AccessTokenType
- func (c *Client) ApplicationType() op.ApplicationType
- func (c *Client) AuthMethod() op.AuthMethod
- func (c *Client) DevMode() bool
- func (c *Client) GetID() string
- func (c *Client) IDTokenLifetime() time.Duration
- func (c *Client) IsScopeAllowed(scope string) bool
- func (c *Client) LoginURL(id string) string
- func (c *Client) PostLogoutRedirectURIs() []string
- func (c *Client) RedirectURIs() []string
- func (c *Client) ResponseTypes() []oidc.ResponseType
- func (c *Client) RestrictAdditionalAccessTokenScopes() func(scopes []string) []string
- func (c *Client) RestrictAdditionalIdTokenScopes() func(scopes []string) []string
- type Endpoint
- type EndpointConfig
- type OPHandlerConfig
- type OPStorage
- func (o *OPStorage) AuthRequestByCode(ctx context.Context, code string) (_ op.AuthRequest, err error)
- func (o *OPStorage) AuthRequestByID(ctx context.Context, id string) (_ op.AuthRequest, err error)
- func (o *OPStorage) AuthorizeClientIDSecret(ctx context.Context, id string, secret string) (err error)
- func (o *OPStorage) CreateAuthRequest(ctx context.Context, req *oidc.AuthRequest, userID string) (_ op.AuthRequest, err error)
- func (o *OPStorage) CreateToken(ctx context.Context, req op.TokenRequest) (_ string, _ time.Time, err error)
- func (o *OPStorage) DeleteAuthRequest(ctx context.Context, id string) (err error)
- func (o *OPStorage) GetClientByClientID(ctx context.Context, id string) (_ op.Client, err error)
- func (o *OPStorage) GetKeyByIDAndUserID(ctx context.Context, keyID, userID string) (_ *jose.JSONWebKey, err error)
- func (o *OPStorage) GetKeySet(ctx context.Context) (_ *jose.JSONWebKeySet, err error)
- func (o *OPStorage) GetPrivateClaimsFromScopes(ctx context.Context, userID, clientID string, scopes []string) (claims map[string]interface{}, err error)
- func (o *OPStorage) GetSigningKey(ctx context.Context, keyCh chan<- jose.SigningKey, errCh chan<- error, ...)
- func (o *OPStorage) GetUserinfoFromScopes(ctx context.Context, userID, applicationID string, scopes []string) (_ oidc.UserInfo, err error)
- func (o *OPStorage) GetUserinfoFromToken(ctx context.Context, tokenID, subject, origin string) (_ oidc.UserInfo, err error)
- func (o *OPStorage) Health(ctx context.Context) error
- func (o *OPStorage) SaveAuthCode(ctx context.Context, id, code string) (err error)
- func (o *OPStorage) SaveNewKeyPair(ctx context.Context) error
- func (o *OPStorage) TerminateSession(ctx context.Context, userID, clientID string) (err error)
- type StorageConfig
Constants ¶
View Source
const ( ScopeProjectRolePrefix = "urn:zitadel:iam:org:project:role:" ClaimProjectRoles = "urn:zitadel:iam:org:project:roles" )
Variables ¶
This section is empty.
Functions ¶
func ACRValuesToBusiness ¶
func ACRValuesToBusiness(values []string) []model.LevelOfAssurance
func AMRFromMFAType ¶
func AuthRequestFromBusiness ¶
func AuthRequestFromBusiness(authReq *model.AuthRequest) (_ op.AuthRequest, err error)
func ClientFromBusiness ¶
func CodeChallengeToBusiness ¶
func CodeChallengeToBusiness(challenge string, method oidc.CodeChallengeMethod) *model.OIDCCodeChallenge
func CodeChallengeToOIDC ¶
func CodeChallengeToOIDC(challenge *model.OIDCCodeChallenge) *oidc.CodeChallenge
func CreateAuthRequestToBusiness ¶
func CreateAuthRequestToBusiness(ctx context.Context, authReq *oidc.AuthRequest, userAgentID, userID string) *model.AuthRequest
func HttpHeadersFromContext ¶
func NewProvider ¶
func NewProvider(ctx context.Context, config OPHandlerConfig, repo repository.Repository, localDevMode bool) op.OpenIDProvider
func ParseBrowserInfoFromContext ¶
func ParseBrowserInfoFromContext(ctx context.Context) *model.BrowserInfo
func ResponseTypeToBusiness ¶
func ResponseTypeToBusiness(responseType oidc.ResponseType) model.OIDCResponseType
func ResponseTypeToOIDC ¶
func ResponseTypeToOIDC(responseType model.OIDCResponseType) oidc.ResponseType
func UILocalesToBusiness ¶
Types ¶
type AuthRequest ¶
type AuthRequest struct {
*model.AuthRequest
}
func (*AuthRequest) Done ¶
func (a *AuthRequest) Done() bool
func (*AuthRequest) GetACR ¶
func (a *AuthRequest) GetACR() string
func (*AuthRequest) GetAMR ¶
func (a *AuthRequest) GetAMR() []string
func (*AuthRequest) GetAudience ¶
func (a *AuthRequest) GetAudience() []string
func (*AuthRequest) GetAuthTime ¶
func (a *AuthRequest) GetAuthTime() time.Time
func (*AuthRequest) GetClientID ¶
func (a *AuthRequest) GetClientID() string
func (*AuthRequest) GetCodeChallenge ¶
func (a *AuthRequest) GetCodeChallenge() *oidc.CodeChallenge
func (*AuthRequest) GetID ¶
func (a *AuthRequest) GetID() string
func (*AuthRequest) GetNonce ¶
func (a *AuthRequest) GetNonce() string
func (*AuthRequest) GetRedirectURI ¶
func (a *AuthRequest) GetRedirectURI() string
func (*AuthRequest) GetResponseType ¶
func (a *AuthRequest) GetResponseType() oidc.ResponseType
func (*AuthRequest) GetScopes ¶
func (a *AuthRequest) GetScopes() []string
func (*AuthRequest) GetState ¶
func (a *AuthRequest) GetState() string
func (*AuthRequest) GetSubject ¶
func (a *AuthRequest) GetSubject() string
type Client ¶
type Client struct {
*model.ApplicationView
// contains filtered or unexported fields
}
func (*Client) AccessTokenLifetime ¶
func (*Client) AccessTokenType ¶
func (c *Client) AccessTokenType() op.AccessTokenType
func (*Client) ApplicationType ¶
func (c *Client) ApplicationType() op.ApplicationType
func (*Client) AuthMethod ¶ added in v0.70.0
func (c *Client) AuthMethod() op.AuthMethod
func (*Client) IDTokenLifetime ¶
func (*Client) IsScopeAllowed ¶ added in v0.101.0
func (*Client) PostLogoutRedirectURIs ¶
func (*Client) RedirectURIs ¶
func (*Client) ResponseTypes ¶ added in v0.70.0
func (c *Client) ResponseTypes() []oidc.ResponseType
func (*Client) RestrictAdditionalAccessTokenScopes ¶ added in v0.101.0
func (*Client) RestrictAdditionalIdTokenScopes ¶ added in v0.101.0
type EndpointConfig ¶
type OPHandlerConfig ¶
type OPHandlerConfig struct {
OPConfig *op.Config
StorageConfig StorageConfig
UserAgentCookieConfig *middleware.UserAgentCookieConfig
Cache *middleware.CacheConfig
Endpoints *EndpointConfig
}
type OPStorage ¶
type OPStorage struct {
// contains filtered or unexported fields
}
func (*OPStorage) AuthRequestByCode ¶
func (*OPStorage) AuthRequestByID ¶
func (*OPStorage) AuthorizeClientIDSecret ¶
func (*OPStorage) CreateAuthRequest ¶
func (o *OPStorage) CreateAuthRequest(ctx context.Context, req *oidc.AuthRequest, userID string) (_ op.AuthRequest, err error)
func (*OPStorage) CreateToken ¶
func (*OPStorage) DeleteAuthRequest ¶
func (*OPStorage) GetClientByClientID ¶
func (*OPStorage) GetKeyByIDAndUserID ¶ added in v0.85.3
func (*OPStorage) GetPrivateClaimsFromScopes ¶ added in v0.94.0
func (*OPStorage) GetSigningKey ¶
func (*OPStorage) GetUserinfoFromScopes ¶
func (*OPStorage) GetUserinfoFromToken ¶
func (*OPStorage) SaveAuthCode ¶
Click to show internal directories.
Click to hide internal directories.