Versions in this module Expand all Collapse all v0 v0.0.1 Feb 13, 2023 Changes in this version + const ClientAppTypeNative + const ClientAppTypeUserAgent + const ClientAppTypeWeb + const ClientAssertionTypeJWTBearer + const ClientAssertionTypeSMAL2Bearer + const ResponseTypeCode + const ResponseTypeCodeIDToken + const ResponseTypeCodeToken + const ResponseTypeCodeTokenIDToken + const ResponseTypeDevice + const ResponseTypeIDToken + const ResponseTypeNone + const ResponseTypeToken + const ResponseTypeTokenIDToken + var CheckSessionIframe *template.Template + var DefaultExpirations = Expirations + var ErrAccessDenied = Error + var ErrAccountSelectionRequired = Error + var ErrAuthorizationPending = Error + var ErrConsentRequired = Error + var ErrExpiredToken = Error + var ErrIncompatibleAceProfiles = Error + var ErrInsufficientScope = Error + var ErrInteractionRequired = Error + var ErrInvalidAuthorizationDetails = Error + var ErrInvalidClient = Error + var ErrInvalidGrant = Error + var ErrInvalidRequest = Error + var ErrInvalidRequestObject = Error + var ErrInvalidRequestURI = Error + var ErrInvalidScope = Error + var ErrInvalidTarget = Error + var ErrInvalidToken = Error + var ErrLoginRequired = Error + var ErrNotFoundEntity = errors.New("not found entity") + var ErrRegistrationNotSupported = Error + var ErrRequestNotSupported = Error + var ErrRequestURINotSupported = Error + var ErrServerError = Error + var ErrSlowDown = Error + var ErrTemporarilyUnavailable = Error + var ErrUnauthorizedClient = Error + var ErrUnsupportedGrantType = Error + var ErrUnsupportedPopKey = Error + var ErrUnsupportedResponseType = Error + var ErrUnsupportedTokenType = Error + func IsExtensionGrants(grantType GrantType) bool + func IsValidDisplay(opt Display) bool + func IsValidPrompt(opt Prompt) bool + func OutputHTML(resp *Response, w http.ResponseWriter, r *http.Request) error + func OutputJSON(resp *Response, w http.ResponseWriter, r *http.Request) error + type AccessData struct + AccessToken string + Client Client + CreatedAt time.Time + ExpiresIn int + RefreshToken string + Scope SpaceDelimitedArr + TokenType string + UserData *UserInfo + type AccessRequest struct + AccessData *AccessData + AuthorizationCodeReq *GrantAuthorizationCodeRequest + AuthorizeData *AuthorizeData + Client Client + ClientCredentialsReq *GrantClientCredentialsRequest + DeviceCodeReq *GrantDeviceCodeRequest + GenerateRefresh bool + GrantType GrantType + ImplicitReq *GrantImplicitRequest + Issuer string + JwtBearerReq *GrantJwtBearerRequest + PasswordReq *GrantPasswordRequest + RefreshTokenReq *GrantRefreshTokenRequest + Saml2BearerReq *GrantSaml2BearerRequest + TokenExchangeReq *GrantTokenExchangeRequest + UserID string + type Address struct + Country string + Formatted string + Locality string + PostalCode string + Region string + StreetAddress string + type AuthorizeData struct + CreatedAt time.Time + ExpiresIn int + type AuthorizeRequest struct + ACRValues []string + Client Client + ClientID string + CodeChallenge string + CodeChallengeMethod CodeChallengeMethod + Display Display + IDTokenHint string + Issuer string + LoginHint string + MaxAge int + Nonce string + OfflineAccess bool + OpenID bool + Prompt SpaceDelimitedArr + RedirectURI string + Request string + ResponseMode ResponseMode + ResponseType SpaceDelimitedArr + Scope SpaceDelimitedArr + State string + UILocales Locales + UserID string + type CheckSessionRequest struct + ClientID string + ExpiresIn int + Issuer string + Origin string + type ClaimType string + const ClaimTypeAggregated + const ClaimTypeDistributed + const ClaimTypeNormal + type Client interface + ClientID func() string + ClientSecret func() string + ClientType func() ClientType + DeviceAuthPath func() string + ExpirationOptions func() Expirations + GrantTypes func() []GrantType + IsScopeAllowed func(scope string) bool + JWTSigningMethod func() jwt.SigningMethod + PrivateKey func() (crypto.Signer, error) + RedirectURI func() string + ResponseTypes func() []ResponseType + type ClientAppType string + type ClientAssertionType string + type ClientAuthMethod string + const ClientAuthMethodNone + const ClientAuthMethodPrivateKeyJWT + const ClientAuthMethodSecretBasic + const ClientAuthMethodSecretJWT + const ClientAuthMethodSecretPost + const ClientAuthMethodSelfSignedTLSClientAuth + const ClientAuthMethodTLSClientAuth + type ClientType string + const ClientTypeConfidential + const ClientTypePublic + type CodeChallengeMethod string + const CodeChallengeMethodPlain + const CodeChallengeMethodS256 + type Configuration struct + ACRValuesSupported []string + AuthorizationEndpoint string + CheckSessionIframe string + ClaimTypesSupported []ClaimType + ClaimsLocalesSupported []string + ClaimsParameterSupported bool + ClaimsSupported []string + CodeChallengeMethodsSupported []CodeChallengeMethod + DeviceAuthorizationEndpoint string + DisplayValuesSupported []Display + EndSessionEndpoint string + GrantTypesSupported []GrantType + IDTokenEncryptionAlgValuesSupported []string + IDTokenEncryptionEncValuesSupported []string + IDTokenSigningAlgValuesSupported []string + IntrospectionEndpoint string + IntrospectionEndpointAuthMethodSupported []ClientAuthMethod + IntrospectionEndpointAuthSigningAlgValuesSupported []string + Issuer string + JwksURI string + OPPolicyURI string + OPTosURI string + RegistrationEndpoint string + RequestObjectEncryptionAlgValuesSupported []string + RequestObjectEncryptionEncValuesSupported []string + RequestObjectSigningAlgValuesSupported []string + RequestParameterSupported bool + RequestURIParameterSupported bool + RequireRequestURIRegistration bool + ResponseModesSupported []ResponseMode + ResponseTypesSupported []ResponseType + RevocationEndpoint string + RevocationEndpointAuthMethodsSupported []ClientAuthMethod + RevocationEndpointAuthSigningAlgValuesSupported []string + ScopesSupported []Scope + ServiceDocumentation string + SubjectTypesSupported []SubjectType + TokenEndpoint string + TokenEndpointAuthMethodsSupported []ClientAuthMethod + TokenEndpointAuthSigningAlgValuesSupported []string + UILocalesSupported []string + UserinfoEncryptionAlgValuesSupported []string + UserinfoEncryptionEncValuesSupported []Display + UserinfoEndpoint string + UserinfoSigningAlgValuesSupported []string + type CustomClaims = jwt.MapClaims + type Display string + const DisplayPage + const DisplayPopup + const DisplayTouch + const DisplayWap + type EndSessionRequest struct + ClientID string + IDTokenHint string + Issuer string + PostLogoutRedirectURI string + State string + type Error struct + Description string + ErrorCode string + State string + func (e Error) Desc(desc string) Error + func (e Error) Error() string + func (e Error) Wrap(err error) Error + type Expirations struct + AccessTokenExpiration int + CodeExpiration int + IDTokenExpiration int + PollingInterval int + RefreshTokenExpiration int + type GrantAuthorizationCodeRequest struct + ClientAssertion string + ClientAssertionType string + ClientID string + Code string + CodeVerifier string + RedirectURI string + type GrantClientCredentialsRequest struct + Scope SpaceDelimitedArr + type GrantDeviceCodeRequest struct + ClientID string + Scope SpaceDelimitedArr + type GrantImplicitRequest struct + RedirectURI string + Scope SpaceDelimitedArr + type GrantJwtBearerRequest struct + Assertion string + ClientID string + Scope SpaceDelimitedArr + type GrantPasswordRequest struct + Password string + Scope SpaceDelimitedArr + Username string + type GrantRefreshTokenRequest struct + ClientAssertion string + ClientAssertionType string + RefreshToken string + Scope SpaceDelimitedArr + type GrantSaml2BearerRequest struct + Assertion string + ClientID string + Scope SpaceDelimitedArr + type GrantTokenExchangeRequest struct + ActorToken string + ActorTokenType string + Audience jwt.ClaimStrings + RequestedTokenType string + Resource []string + Scope SpaceDelimitedArr + SubjectToken string + SubjectTokenType string + type GrantType string + const GrantTypeAuthorizationCode + const GrantTypeClientCredentials + const GrantTypeDeviceCode + const GrantTypeImplicit + const GrantTypeJwtBearer + const GrantTypePassword + const GrantTypeRefreshToken + const GrantTypeSAML2Bearer + const GrantTypeTokenExchange + type IDToken struct + ACSR string + AMR []string + ATHash string + AZP string + Audience jwt.ClaimStrings + AuthTime *jwt.NumericDate + CHash string + Expiration *jwt.NumericDate + IssuedAt *jwt.NumericDate + Issuer string + Nonce string + SubJWK *jose.JSONWebKey + Subject string + type Locales []language.Tag + func (l *Locales) UnmarshalText(text []byte) error + type Prompt string + const PromptConsent + const PromptLogin + const PromptNone + const PromptSelectAccount + type Response struct + ErrCode error + Header http.Header + Output map[string]interface{} + RedirectURL string + ResponseMode ResponseMode + func NewResponse() *Response + func (resp *Response) GetRedirectURL() (string, error) + func (resp *Response) GetStatusCode() int + func (resp *Response) SetErrorURI(err Error, uri, state string) + func (resp *Response) SetRedirectURL(url string) + func (resp *Response) SetResponseMode(mode ResponseMode) + type ResponseMode string + const ResponseModeFormPost + const ResponseModeFragment + const ResponseModeQuery + const ResponseModeWebMessage + type ResponseType string + type RevocationRequest struct + Client Client + Issuer string + Token string + TokenTypeHint TokenTypeHint + type Scope = string + const ScopeAddress + const ScopeEmail + const ScopeOfflineAccess + const ScopeOpenID + const ScopePhone + const ScopeProfile + type Session interface + AllowedOrigin func() string + SessionExpiresIn func(cookie string) int + type SpaceDelimitedArr []string + func (s *SpaceDelimitedArr) UnmarshalJSON(data []byte) error + func (s *SpaceDelimitedArr) UnmarshalText(text []byte) error + func (s SpaceDelimitedArr) Encode() string + func (s SpaceDelimitedArr) MarshalJSON() ([]byte, error) + func (s SpaceDelimitedArr) MarshalText() ([]byte, error) + type Storage interface + Client func(clientID string) (Client, error) + LoadAccess func(token string) (data *AccessData, err error) + LoadAuthorize func(code string) (data *AuthorizeData, err error) + LoadRefresh func(token string) (data *AccessData, err error) + RemoveAccess func(token string) error + RemoveAuthorize func(code string) error + RemoveRefresh func(token string) error + SaveAccess func(token string, data *AccessData, exp int) error + SaveAuthorize func(code string, data *AuthorizeData, exp int) error + SaveRefresh func(refresh, token string, exp int) (err error) + UserDataScopes func(uid string, scopes []Scope) (*UserInfo, error) + type SubjectType string + const SubjectTypePairwise + const SubjectTypePublic + type TokenType string + const TokenTypeAccessToken + const TokenTypeIDToken + const TokenTypeJWT + const TokenTypeRefreshToken + const TokenTypeSAML1 + const TokenTypeSAML2 + type TokenTypeHint string + const TokenTypeHintAccessToken + const TokenTypeHintRefreshToken + type UserInfo struct + Address *Address + Birthdate string + Email string + EmailVerified *bool + FamilyName string + Gender string + GivenName string + Locale string + MiddleName string + Name string + Nickname string + PhoneNumber string + PhoneNumberVerified *bool + Picture string + PreferredUsername string + Profile string + Subject string + UpdatedAt *jwt.NumericDate + Website string + Zoneinfo string + type UserInfoRequest struct + AccessData *AccessData + Issuer string + Subject string + Token string