Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidGrantType = credstackError.NewError(400, "ERR_INVALID_GRANT", "token: Failed to issue token. The specified grant type does not exist")
ErrInvalidGrantType - A named error that gets returned when an unrecognized grant type is used to attempt to issue tokens
var ErrInvalidTokenRequest = credstackError.NewError(400, "ERR_INVALID_TOKEN_REQ", "token: Failed to issue token. One or more parts of the token request is missing")
ErrInvalidTokenRequest - An error that gets returned if one or more elements of the token request are missing
ErrUnauthorizedAudience - An error that gets returned when an application tries to issue tokens for an audience that it is not authorized too
ErrUnauthorizedGrantType - An error that gets returned when an application tries to issue tokens for a grant type that it is not authorized too
Functions ¶
func ClientCredentialsFlow ¶ added in v1.3.1
func ClientCredentialsFlow(serv *server.Server, request *request.TokenRequest, issuer string) (*tokenModel.TokenResponse, error)
ClientCredentialsFlow - Attempts to issue a token under Client Credentials flow and begins any validation required for ensuring that the request received was valid.
func IssueTokenForFlow ¶ added in v1.3.1
func IssueTokenForFlow(serv *server.Server, request *request.TokenRequest, issuer string) (*tokenModel.TokenResponse, error)
IssueTokenForFlow - Responsible for issuing access tokens under a specific OAuth authentication flow. Handles validating token requests and marshaling access tokens to a token.TokenResponse structure. Any errors that are returned from this function are wrapped with errors.CredstackError.
Types ¶
This section is empty.