Documentation ¶
Index ¶
- Constants
- func AccessAuthentication(token string) models.Session
- func AccessTokenRequest(data utils.H) (utils.H, error)
- func AuthorizationCodeGrant(data utils.H) (utils.H, error)
- func ClientAuthentication(authorizationHeader string) models.Client
- func RefreshTokenRequest(data utils.H) (utils.H, error)
Constants ¶
View Source
const ( // InvalidRequest error type InvalidRequest string = "invalid_request" UnauthorizedClient string = "unauthorized_client" // AccessDenied error type AccessDenied string = "access_denied" // UnsupportedResponseType error type UnsupportedResponseType string = "unsupported_response_type" // InvalidScope error type InvalidScope string = "invalid_scope" // ServerError error type ServerError string = "server_error" TemporarilyUnavailable string = "temporarily_unavailable" // UnsupportedGrantType error type UnsupportedGrantType string = "unsupported_grant_type" // InvalidGrant error type InvalidGrant string = "invalid_grant" // InvalidSession error type InvalidSession string = "invalid_session" // InvalidRedirectURI error type InvalidRedirectURI string = "invalid_redirect_uri" // AuthorizationCode grant type AuthorizationCode string = "authorization_code" // RefreshToken grant type RefreshToken string = "refresh_token" // Password grant type Password string = "password" // ClientCredentials grant type ClientCredentials string = "client_credentials" // Code response type Code string = "code" // Token response type Token string = "token" )
Variables ¶
This section is empty.
Functions ¶
func AccessAuthentication ¶
AccessAuthentication obtains a Session entry (typed as an `Access Token`) through
its token string
func AccessTokenRequest ¶
AccessTokenRequest returns OAuth 2 access and refresh tokens, given the right details:
basically, a `code` from `AuthorizationCodeGrant`
func AuthorizationCodeGrant ¶
AuthorizationCodeGrant returns an OAuth 2 authorization code grant, given the right details
func ClientAuthentication ¶
ClientAuthentication authenticates a client application, extracting the key-secret pair;
and returns a client entry/model, given the key-secret pair
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.