Documentation ¶
Index ¶
- Constants
- type ConsentStrategy
- type DefaultConsentStrategy
- type FositeMemoryStore
- func (s *FositeMemoryStore) CreateAccessTokenSession(_ context.Context, signature string, req fosite.Requester) error
- func (s *FositeMemoryStore) CreateAuthorizeCodeSession(_ context.Context, code string, req fosite.Requester) error
- func (s *FositeMemoryStore) CreateImplicitAccessTokenSession(ctx context.Context, code string, req fosite.Requester) error
- func (s *FositeMemoryStore) CreateOpenIDConnectSession(_ context.Context, authorizeCode string, requester fosite.Requester) error
- func (s *FositeMemoryStore) CreateRefreshTokenSession(_ context.Context, signature string, req fosite.Requester) error
- func (s *FositeMemoryStore) DeleteAccessTokenSession(_ context.Context, signature string) error
- func (s *FositeMemoryStore) DeleteAuthorizeCodeSession(_ context.Context, code string) error
- func (s *FositeMemoryStore) DeleteOpenIDConnectSession(_ context.Context, authorizeCode string) error
- func (s *FositeMemoryStore) DeleteRefreshTokenSession(_ context.Context, signature string) error
- func (s *FositeMemoryStore) GetAccessTokenSession(_ context.Context, signature string, _ fosite.Session) (fosite.Requester, error)
- func (s *FositeMemoryStore) GetAuthorizeCodeSession(_ context.Context, code string, _ fosite.Session) (fosite.Requester, error)
- func (s *FositeMemoryStore) GetOpenIDConnectSession(_ context.Context, authorizeCode string, requester fosite.Requester) (fosite.Requester, error)
- func (s *FositeMemoryStore) GetRefreshTokenSession(_ context.Context, signature string, _ fosite.Session) (fosite.Requester, error)
- func (s *FositeMemoryStore) PersistAuthorizeCodeGrantSession(ctx context.Context, authorizeCode, accessSignature, refreshSignature string, ...) error
- func (s *FositeMemoryStore) PersistRefreshTokenGrantSession(ctx context.Context, ...) error
- func (s *FositeMemoryStore) RevokeAccessToken(ctx context.Context, id string) error
- func (s *FositeMemoryStore) RevokeRefreshToken(ctx context.Context, id string) error
- type FositeRedisStore
- func (s *FositeRedisStore) CreateAccessTokenSession(_ context.Context, signature string, req fosite.Requester) error
- func (s *FositeRedisStore) CreateAuthorizeCodeSession(_ context.Context, code string, req fosite.Requester) error
- func (s *FositeRedisStore) CreateImplicitAccessTokenSession(ctx context.Context, code string, req fosite.Requester) error
- func (s *FositeRedisStore) CreateOpenIDConnectSession(_ context.Context, authorizeCode string, req fosite.Requester) error
- func (s *FositeRedisStore) CreateRefreshTokenSession(_ context.Context, signature string, req fosite.Requester) error
- func (s *FositeRedisStore) DeleteAccessTokenSession(_ context.Context, signature string) error
- func (s *FositeRedisStore) DeleteAuthorizeCodeSession(_ context.Context, code string) error
- func (s *FositeRedisStore) DeleteOpenIDConnectSession(_ context.Context, authorizeCode string) error
- func (s *FositeRedisStore) DeleteRefreshTokenSession(_ context.Context, signature string) error
- func (s *FositeRedisStore) GetAccessTokenSession(_ context.Context, signature string, sess fosite.Session) (fosite.Requester, error)
- func (s *FositeRedisStore) GetAuthorizeCodeSession(_ context.Context, code string, sess fosite.Session) (fosite.Requester, error)
- func (s *FositeRedisStore) GetOpenIDConnectSession(_ context.Context, authorizeCode string, req fosite.Requester) (fosite.Requester, error)
- func (s *FositeRedisStore) GetRefreshTokenSession(_ context.Context, signature string, sess fosite.Session) (fosite.Requester, error)
- func (s *FositeRedisStore) PersistAuthorizeCodeGrantSession(ctx context.Context, authorizeCode, accessSignature, refreshSignature string, ...) error
- func (s *FositeRedisStore) PersistRefreshTokenGrantSession(ctx context.Context, ...) error
- func (s *FositeRedisStore) RevokeAccessToken(ctx context.Context, id string) error
- func (s *FositeRedisStore) RevokeRefreshToken(ctx context.Context, id string) error
- type FositeRethinkDBStore
- func (m *FositeRethinkDBStore) ColdStart() error
- func (s *FositeRethinkDBStore) CreateAccessTokenSession(_ context.Context, signature string, requester fosite.Requester) error
- func (s *FositeRethinkDBStore) CreateAuthorizeCodeSession(_ context.Context, code string, requester fosite.Requester) error
- func (s *FositeRethinkDBStore) CreateImplicitAccessTokenSession(ctx context.Context, code string, req fosite.Requester) error
- func (s *FositeRethinkDBStore) CreateOpenIDConnectSession(_ context.Context, authorizeCode string, requester fosite.Requester) error
- func (s *FositeRethinkDBStore) CreateRefreshTokenSession(_ context.Context, signature string, requester fosite.Requester) error
- func (s *FositeRethinkDBStore) DeleteAccessTokenSession(_ context.Context, signature string) error
- func (s *FositeRethinkDBStore) DeleteAuthorizeCodeSession(_ context.Context, code string) error
- func (s *FositeRethinkDBStore) DeleteOpenIDConnectSession(_ context.Context, authorizeCode string) error
- func (s *FositeRethinkDBStore) DeleteRefreshTokenSession(_ context.Context, signature string) error
- func (s *FositeRethinkDBStore) GetAccessTokenSession(_ context.Context, signature string, sess fosite.Session) (fosite.Requester, error)
- func (s *FositeRethinkDBStore) GetAuthorizeCodeSession(_ context.Context, code string, sess fosite.Session) (fosite.Requester, error)
- func (s *FositeRethinkDBStore) GetOpenIDConnectSession(_ context.Context, authorizeCode string, requester fosite.Requester) (fosite.Requester, error)
- func (s *FositeRethinkDBStore) GetRefreshTokenSession(_ context.Context, signature string, sess fosite.Session) (fosite.Requester, error)
- func (s *FositeRethinkDBStore) PersistAuthorizeCodeGrantSession(ctx context.Context, authorizeCode, accessSignature, refreshSignature string, ...) error
- func (s *FositeRethinkDBStore) PersistRefreshTokenGrantSession(ctx context.Context, ...) error
- func (s *FositeRethinkDBStore) RevokeAccessToken(ctx context.Context, id string) error
- func (s *FositeRethinkDBStore) RevokeRefreshToken(ctx context.Context, id string) error
- func (m *FositeRethinkDBStore) Watch(ctx context.Context)
- type FositeSQLStore
- func (s *FositeSQLStore) CreateAccessTokenSession(_ context.Context, signature string, requester fosite.Requester) error
- func (s *FositeSQLStore) CreateAuthorizeCodeSession(_ context.Context, signature string, requester fosite.Requester) error
- func (s *FositeSQLStore) CreateImplicitAccessTokenSession(ctx context.Context, signature string, requester fosite.Requester) error
- func (s *FositeSQLStore) CreateOpenIDConnectSession(_ context.Context, signature string, requester fosite.Requester) error
- func (s *FositeSQLStore) CreateRefreshTokenSession(_ context.Context, signature string, requester fosite.Requester) error
- func (s *FositeSQLStore) CreateSchemas() error
- func (s *FositeSQLStore) DeleteAccessTokenSession(_ context.Context, signature string) error
- func (s *FositeSQLStore) DeleteAuthorizeCodeSession(_ context.Context, signature string) error
- func (s *FositeSQLStore) DeleteOpenIDConnectSession(_ context.Context, signature string) error
- func (s *FositeSQLStore) DeleteRefreshTokenSession(_ context.Context, signature string) error
- func (s *FositeSQLStore) GetAccessTokenSession(_ context.Context, signature string, session fosite.Session) (fosite.Requester, error)
- func (s *FositeSQLStore) GetAuthorizeCodeSession(_ context.Context, signature string, session fosite.Session) (fosite.Requester, error)
- func (s *FositeSQLStore) GetOpenIDConnectSession(_ context.Context, signature string, requester fosite.Requester) (fosite.Requester, error)
- func (s *FositeSQLStore) GetRefreshTokenSession(_ context.Context, signature string, session fosite.Session) (fosite.Requester, error)
- func (s *FositeSQLStore) PersistAuthorizeCodeGrantSession(ctx context.Context, authorizeCode, accessSignature, refreshSignature string, ...) error
- func (s *FositeSQLStore) PersistRefreshTokenGrantSession(ctx context.Context, ...) error
- func (s *FositeSQLStore) RevokeAccessToken(ctx context.Context, id string) error
- func (s *FositeSQLStore) RevokeRefreshToken(ctx context.Context, id string) error
- type HTTPIntrospector
- type HTTPRecovator
- type Handler
- func (h *Handler) AuthHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (o *Handler) DefaultConsentHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (h *Handler) IntrospectHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (h *Handler) RevocationHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (h *Handler) SetRoutes(r *httprouter.Router)
- func (h *Handler) TokenHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- type Introspection
- type Introspector
- type RDBItems
- type RdbSchema
- type Revocator
- type Session
Constants ¶
View Source
const ( ConsentChallengeKey = "hydra.consent.challenge" ConsentEndpointKey = "hydra.consent.response" )
View Source
const ( OpenIDConnectKeyName = "hydra.openid.id-token" ConsentPath = "/oauth2/consent" TokenPath = "/oauth2/token" AuthPath = "/oauth2/auth" // IntrospectPath points to the OAuth2 introspection endpoint. IntrospectPath = "/oauth2/introspect" RevocationPath = "/oauth2/revoke" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsentStrategy ¶
type DefaultConsentStrategy ¶
type DefaultConsentStrategy struct { Issuer string DefaultIDTokenLifespan time.Duration DefaultChallengeLifespan time.Duration KeyManager jwk.Manager }
func (*DefaultConsentStrategy) IssueChallenge ¶
func (s *DefaultConsentStrategy) IssueChallenge(authorizeRequest fosite.AuthorizeRequester, redirectURL string, session *sessions.Session) (string, error)
func (*DefaultConsentStrategy) ValidateResponse ¶
func (s *DefaultConsentStrategy) ValidateResponse(a fosite.AuthorizeRequester, token string, session *sessions.Session) (claims *Session, err error)
type FositeMemoryStore ¶ added in v0.6.0
type FositeMemoryStore struct { client.Manager AuthorizeCodes map[string]fosite.Requester IDSessions map[string]fosite.Requester AccessTokens map[string]fosite.Requester RefreshTokens map[string]fosite.Requester sync.RWMutex }
func (*FositeMemoryStore) CreateAccessTokenSession ¶ added in v0.6.0
func (*FositeMemoryStore) CreateAuthorizeCodeSession ¶ added in v0.6.0
func (*FositeMemoryStore) CreateImplicitAccessTokenSession ¶ added in v0.6.0
func (*FositeMemoryStore) CreateOpenIDConnectSession ¶ added in v0.6.0
func (*FositeMemoryStore) CreateRefreshTokenSession ¶ added in v0.6.0
func (*FositeMemoryStore) DeleteAccessTokenSession ¶ added in v0.6.0
func (s *FositeMemoryStore) DeleteAccessTokenSession(_ context.Context, signature string) error
func (*FositeMemoryStore) DeleteAuthorizeCodeSession ¶ added in v0.6.0
func (s *FositeMemoryStore) DeleteAuthorizeCodeSession(_ context.Context, code string) error
func (*FositeMemoryStore) DeleteOpenIDConnectSession ¶ added in v0.6.0
func (s *FositeMemoryStore) DeleteOpenIDConnectSession(_ context.Context, authorizeCode string) error
func (*FositeMemoryStore) DeleteRefreshTokenSession ¶ added in v0.6.0
func (s *FositeMemoryStore) DeleteRefreshTokenSession(_ context.Context, signature string) error
func (*FositeMemoryStore) GetAccessTokenSession ¶ added in v0.6.0
func (*FositeMemoryStore) GetAuthorizeCodeSession ¶ added in v0.6.0
func (*FositeMemoryStore) GetOpenIDConnectSession ¶ added in v0.6.0
func (*FositeMemoryStore) GetRefreshTokenSession ¶ added in v0.6.0
func (*FositeMemoryStore) PersistAuthorizeCodeGrantSession ¶ added in v0.6.0
func (*FositeMemoryStore) PersistRefreshTokenGrantSession ¶ added in v0.6.0
func (*FositeMemoryStore) RevokeAccessToken ¶ added in v0.6.0
func (s *FositeMemoryStore) RevokeAccessToken(ctx context.Context, id string) error
func (*FositeMemoryStore) RevokeRefreshToken ¶ added in v0.6.0
func (s *FositeMemoryStore) RevokeRefreshToken(ctx context.Context, id string) error
type FositeRedisStore ¶ added in v0.6.5
func (*FositeRedisStore) CreateAccessTokenSession ¶ added in v0.6.5
func (*FositeRedisStore) CreateAuthorizeCodeSession ¶ added in v0.6.5
func (*FositeRedisStore) CreateImplicitAccessTokenSession ¶ added in v0.6.5
func (*FositeRedisStore) CreateOpenIDConnectSession ¶ added in v0.6.5
func (*FositeRedisStore) CreateRefreshTokenSession ¶ added in v0.6.5
func (*FositeRedisStore) DeleteAccessTokenSession ¶ added in v0.6.5
func (s *FositeRedisStore) DeleteAccessTokenSession(_ context.Context, signature string) error
func (*FositeRedisStore) DeleteAuthorizeCodeSession ¶ added in v0.6.5
func (s *FositeRedisStore) DeleteAuthorizeCodeSession(_ context.Context, code string) error
func (*FositeRedisStore) DeleteOpenIDConnectSession ¶ added in v0.6.5
func (s *FositeRedisStore) DeleteOpenIDConnectSession(_ context.Context, authorizeCode string) error
func (*FositeRedisStore) DeleteRefreshTokenSession ¶ added in v0.6.5
func (s *FositeRedisStore) DeleteRefreshTokenSession(_ context.Context, signature string) error
func (*FositeRedisStore) GetAccessTokenSession ¶ added in v0.6.5
func (*FositeRedisStore) GetAuthorizeCodeSession ¶ added in v0.6.5
func (*FositeRedisStore) GetOpenIDConnectSession ¶ added in v0.6.5
func (*FositeRedisStore) GetRefreshTokenSession ¶ added in v0.6.5
func (*FositeRedisStore) PersistAuthorizeCodeGrantSession ¶ added in v0.6.5
func (*FositeRedisStore) PersistRefreshTokenGrantSession ¶ added in v0.6.5
func (*FositeRedisStore) RevokeAccessToken ¶ added in v0.6.5
func (s *FositeRedisStore) RevokeAccessToken(ctx context.Context, id string) error
func (*FositeRedisStore) RevokeRefreshToken ¶ added in v0.6.5
func (s *FositeRedisStore) RevokeRefreshToken(ctx context.Context, id string) error
type FositeRethinkDBStore ¶ added in v0.7.9
type FositeRethinkDBStore struct { Session *r.Session sync.RWMutex AuthorizeCodesTable r.Term IDSessionsTable r.Term AccessTokensTable r.Term RefreshTokensTable r.Term ClientsTable r.Term client.Manager AuthorizeCodes RDBItems IDSessions RDBItems AccessTokens RDBItems RefreshTokens RDBItems }
func (*FositeRethinkDBStore) ColdStart ¶ added in v0.7.9
func (m *FositeRethinkDBStore) ColdStart() error
func (*FositeRethinkDBStore) CreateAccessTokenSession ¶ added in v0.7.9
func (*FositeRethinkDBStore) CreateAuthorizeCodeSession ¶ added in v0.7.9
func (*FositeRethinkDBStore) CreateImplicitAccessTokenSession ¶ added in v0.7.9
func (*FositeRethinkDBStore) CreateOpenIDConnectSession ¶ added in v0.7.9
func (*FositeRethinkDBStore) CreateRefreshTokenSession ¶ added in v0.7.9
func (*FositeRethinkDBStore) DeleteAccessTokenSession ¶ added in v0.7.9
func (s *FositeRethinkDBStore) DeleteAccessTokenSession(_ context.Context, signature string) error
func (*FositeRethinkDBStore) DeleteAuthorizeCodeSession ¶ added in v0.7.9
func (s *FositeRethinkDBStore) DeleteAuthorizeCodeSession(_ context.Context, code string) error
func (*FositeRethinkDBStore) DeleteOpenIDConnectSession ¶ added in v0.7.9
func (s *FositeRethinkDBStore) DeleteOpenIDConnectSession(_ context.Context, authorizeCode string) error
func (*FositeRethinkDBStore) DeleteRefreshTokenSession ¶ added in v0.7.9
func (s *FositeRethinkDBStore) DeleteRefreshTokenSession(_ context.Context, signature string) error
func (*FositeRethinkDBStore) GetAccessTokenSession ¶ added in v0.7.9
func (*FositeRethinkDBStore) GetAuthorizeCodeSession ¶ added in v0.7.9
func (*FositeRethinkDBStore) GetOpenIDConnectSession ¶ added in v0.7.9
func (*FositeRethinkDBStore) GetRefreshTokenSession ¶ added in v0.7.9
func (*FositeRethinkDBStore) PersistAuthorizeCodeGrantSession ¶ added in v0.7.9
func (*FositeRethinkDBStore) PersistRefreshTokenGrantSession ¶ added in v0.7.9
func (*FositeRethinkDBStore) RevokeAccessToken ¶ added in v0.7.9
func (s *FositeRethinkDBStore) RevokeAccessToken(ctx context.Context, id string) error
func (*FositeRethinkDBStore) RevokeRefreshToken ¶ added in v0.7.9
func (s *FositeRethinkDBStore) RevokeRefreshToken(ctx context.Context, id string) error
func (*FositeRethinkDBStore) Watch ¶ added in v0.7.9
func (m *FositeRethinkDBStore) Watch(ctx context.Context)
type FositeSQLStore ¶ added in v0.6.0
func (*FositeSQLStore) CreateAccessTokenSession ¶ added in v0.6.0
func (*FositeSQLStore) CreateAuthorizeCodeSession ¶ added in v0.6.0
func (*FositeSQLStore) CreateImplicitAccessTokenSession ¶ added in v0.6.0
func (*FositeSQLStore) CreateOpenIDConnectSession ¶ added in v0.6.0
func (*FositeSQLStore) CreateRefreshTokenSession ¶ added in v0.6.0
func (*FositeSQLStore) CreateSchemas ¶ added in v0.6.0
func (s *FositeSQLStore) CreateSchemas() error
func (*FositeSQLStore) DeleteAccessTokenSession ¶ added in v0.6.0
func (s *FositeSQLStore) DeleteAccessTokenSession(_ context.Context, signature string) error
func (*FositeSQLStore) DeleteAuthorizeCodeSession ¶ added in v0.6.0
func (s *FositeSQLStore) DeleteAuthorizeCodeSession(_ context.Context, signature string) error
func (*FositeSQLStore) DeleteOpenIDConnectSession ¶ added in v0.6.0
func (s *FositeSQLStore) DeleteOpenIDConnectSession(_ context.Context, signature string) error
func (*FositeSQLStore) DeleteRefreshTokenSession ¶ added in v0.6.0
func (s *FositeSQLStore) DeleteRefreshTokenSession(_ context.Context, signature string) error
func (*FositeSQLStore) GetAccessTokenSession ¶ added in v0.6.0
func (*FositeSQLStore) GetAuthorizeCodeSession ¶ added in v0.6.0
func (*FositeSQLStore) GetOpenIDConnectSession ¶ added in v0.6.0
func (*FositeSQLStore) GetRefreshTokenSession ¶ added in v0.6.0
func (*FositeSQLStore) PersistAuthorizeCodeGrantSession ¶ added in v0.6.0
func (*FositeSQLStore) PersistRefreshTokenGrantSession ¶ added in v0.6.0
func (*FositeSQLStore) RevokeAccessToken ¶ added in v0.6.0
func (s *FositeSQLStore) RevokeAccessToken(ctx context.Context, id string) error
func (*FositeSQLStore) RevokeRefreshToken ¶ added in v0.6.0
func (s *FositeSQLStore) RevokeRefreshToken(ctx context.Context, id string) error
type HTTPIntrospector ¶ added in v0.4.0
func (*HTTPIntrospector) IntrospectToken ¶ added in v0.4.0
func (i *HTTPIntrospector) IntrospectToken(ctx context.Context, token string, scopes ...string) (*Introspection, error)
IntrospectToken is capable of introspecting tokens according to https://tools.ietf.org/html/rfc7662
The HTTP API is documented at http://docs.hdyra.apiary.io/#reference/oauth2/oauth2-token-introspection
func (*HTTPIntrospector) SetClient ¶ added in v0.4.0
func (i *HTTPIntrospector) SetClient(c *clientcredentials.Config)
func (*HTTPIntrospector) TokenFromRequest ¶ added in v0.4.0
func (i *HTTPIntrospector) TokenFromRequest(r *http.Request) string
type HTTPRecovator ¶ added in v0.6.0
type HTTPRecovator struct { Config *clientcredentials.Config Dry bool Endpoint *url.URL Client *http.Client }
func (*HTTPRecovator) RevokeToken ¶ added in v0.6.0
func (r *HTTPRecovator) RevokeToken(ctx context.Context, token string) error
type Handler ¶
type Handler struct { OAuth2 fosite.OAuth2Provider Consent ConsentStrategy H herodot.Herodot ForcedHTTP bool ConsentURL url.URL AccessTokenLifespan time.Duration CookieStore sessions.Store }
func (*Handler) AuthHandler ¶
func (h *Handler) AuthHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Handler) DefaultConsentHandler ¶
func (o *Handler) DefaultConsentHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Handler) IntrospectHandler ¶ added in v0.6.0
func (h *Handler) IntrospectHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Handler) RevocationHandler ¶ added in v0.6.0
func (h *Handler) RevocationHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Handler) SetRoutes ¶
func (h *Handler) SetRoutes(r *httprouter.Router)
func (*Handler) TokenHandler ¶
func (h *Handler) TokenHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
type Introspection ¶ added in v0.4.0
type Introspection struct { // Active is a boolean indicator of whether or not the presented token // is currently active. The specifics of a token's "active" state // will vary depending on the implementation of the authorization // server and the information it keeps about its tokens, but a "true" // value return for the "active" property will generally indicate // that a given token has been issued by this authorization server, // has not been revoked by the resource owner, and is within its // given time window of validity (e.g., after its issuance time and // before its expiration time). Active bool `json:"active"` // Scope is a JSON string containing a space-separated list of // scopes associated with this token. Scope string `json:"scope,omitempty"` // ClientID is aclient identifier for the OAuth 2.0 client that // requested this token. ClientID string `json:"client_id,omitempty"` // Subject of the token, as defined in JWT [RFC7519]. // Usually a machine-readable identifier of the resource owner who // authorized this token. Subject string `json:"sub,omitempty"` // Expires at is an integer timestamp, measured in the number of seconds // since January 1 1970 UTC, indicating when this token will expire. ExpiresAt int64 `json:"exp,omitempty"` // Issued at is an integer timestamp, measured in the number of seconds // since January 1 1970 UTC, indicating when this token was // originally issued. IssuedAt int64 `json:"iat,omitempty"` // NotBefore is an integer timestamp, measured in the number of seconds // since January 1 1970 UTC, indicating when this token is not to be // used before. NotBefore int64 `json:"nbf,omitempty"` // Username is a human-readable identifier for the resource owner who // authorized this token. Username string `json:"username,omitempty"` // Audience is a service-specific string identifier or list of string // identifiers representing the intended audience for this token. Audience string `json:"aud,omitempty"` // Issuer is a string representing the issuer of this token Issuer string `json:"iss,omitempty"` // Extra is arbitrary data set by the session. Extra map[string]interface{} `json:"ext,omitempty"` }
Introspection contains an access token's session data as specified by IETF RFC 7662, see: https://tools.ietf.org/html/rfc7662
type Introspector ¶ added in v0.4.0
type Introspector interface { // IntrospectToken performs a token introspection according to IETF RFC 7662, see: https://tools.ietf.org/html/rfc7662 // // func anyHttpHandler(w http.ResponseWriter, r *http.Request) { // ctx, err := introspector.IntrospectToken(context.Background(), introspector.TokenFromRequest(r), "photos", "files") // fmt.Sprintf("%s", ctx.Subject) // } IntrospectToken(ctx context.Context, token string, scopes ...string) (*Introspection, error) }
Introspector is capable of introspecting an access token according to IETF RFC 7662, see: https://tools.ietf.org/html/rfc7662
type RdbSchema ¶ added in v0.6.0
type RdbSchema struct { ID string `json:"id" gorethink:"id"` RequestID string `json:"requestId" gorethink:"requestId"` RequestedAt time.Time `json:"requestedAt" gorethink:"requestedAt"` Client *client.Client `json:"client" gorethink:"client"` Scopes fosite.Arguments `json:"scopes" gorethink:"scopes"` GrantedScopes fosite.Arguments `json:"grantedScopes" gorethink:"grantedScopes"` Form url.Values `json:"form" gorethink:"form"` Session json.RawMessage `json:"session" gorethink:"session"` }
Click to show internal directories.
Click to hide internal directories.