Documentation ¶
Index ¶
- Variables
- func Email_AssumeVerified_NOT_Required() oauthrelyingparty.ProviderClaimConfig
- func Email_AssumeVerified_Required() oauthrelyingparty.ProviderClaimConfig
- func FetchUserProfile(ctx context.Context, client *http.Client, accessTokenResp AccessTokenResp, ...) (userProfile map[string]interface{}, err error)
- func GetCode(query string) (code string, err error)
- func MakeAuthorizationURL(base string, query url.Values) string
- func NewOAuthError(errResp *oauthrelyingparty.ErrorResponse) error
- type AccessTokenResp
- type AuthorizationURLParams
- type OIDCDiscoveryDocument
- func (d *OIDCDiscoveryDocument) ExchangeCode(ctx context.Context, client *http.Client, clock oauthrelyingparty.Clock, ...) (jwt.Token, error)
- func (d *OIDCDiscoveryDocument) FetchJWKs(ctx context.Context, client *http.Client) (jwk.Set, error)
- func (d *OIDCDiscoveryDocument) FetchUserInfo(ctx context.Context, client *http.Client, accessTokenResp AccessTokenResp) (userInfo map[string]interface{}, err error)
- func (d *OIDCDiscoveryDocument) MakeOAuthURL(params AuthorizationURLParams) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ContextForTheUnusedContextArgumentInJWXV2API = context.TODO()
jwx@v2 takes context in some of the APIs. But jwx@v3 remove context in those APIs. And actually, the context argument is unused. So we can safely pass it a context.TODO().
View Source
var InvalidConfiguration = apierrors.InternalError.WithReason("InvalidConfiguration")
View Source
var OAuthError = apierrors.BadRequest.WithReason("OAuthError")
View Source
var OAuthProtocolError = apierrors.BadRequest.WithReason("OAuthProtocolError")
Functions ¶
func Email_AssumeVerified_NOT_Required ¶
func Email_AssumeVerified_NOT_Required() oauthrelyingparty.ProviderClaimConfig
func Email_AssumeVerified_Required ¶
func Email_AssumeVerified_Required() oauthrelyingparty.ProviderClaimConfig
func FetchUserProfile ¶
func NewOAuthError ¶
func NewOAuthError(errResp *oauthrelyingparty.ErrorResponse) error
Types ¶
type AccessTokenResp ¶
type AccessTokenResp map[string]interface{}
func FetchAccessTokenResp ¶
func NewBearerAccessTokenResp ¶
func NewBearerAccessTokenResp(accessToken string) AccessTokenResp
func (AccessTokenResp) AccessToken ¶
func (r AccessTokenResp) AccessToken() string
func (AccessTokenResp) ExpiresIn ¶
func (r AccessTokenResp) ExpiresIn() int
func (AccessTokenResp) IDToken ¶
func (r AccessTokenResp) IDToken() string
func (AccessTokenResp) TokenType ¶
func (r AccessTokenResp) TokenType() string
type AuthorizationURLParams ¶
type AuthorizationURLParams struct { ClientID string RedirectURI string Scope []string ResponseType string ResponseMode string State string Prompt []string Nonce string WechatAppID string }
func (AuthorizationURLParams) Query ¶
func (p AuthorizationURLParams) Query() url.Values
type OIDCDiscoveryDocument ¶
type OIDCDiscoveryDocument struct { Issuer string `json:"issuer"` AuthorizationEndpoint string `json:"authorization_endpoint"` TokenEndpoint string `json:"token_endpoint"` UserInfoEndpoint string `json:"userinfo_endpoint"` JWKSUri string `json:"jwks_uri"` }
func (*OIDCDiscoveryDocument) ExchangeCode ¶
func (*OIDCDiscoveryDocument) FetchUserInfo ¶
func (d *OIDCDiscoveryDocument) FetchUserInfo(ctx context.Context, client *http.Client, accessTokenResp AccessTokenResp) (userInfo map[string]interface{}, err error)
func (*OIDCDiscoveryDocument) MakeOAuthURL ¶
func (d *OIDCDiscoveryDocument) MakeOAuthURL(params AuthorizationURLParams) string
Click to show internal directories.
Click to hide internal directories.