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
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 InitiateAuthFlow ¶
func InitiateAuthFlow(serv *server.Server, audience string, clientId string, requestedGrant string) (*apiModel.API, *applicationModel.Application, error)
InitiateAuthFlow - Fetch's an API based on its audience along with its associating application. This acts as a central "initialization" function for any OAuth authentication flows as we almost always need these two models. Additionally, some validation is performed here to ensure that the requested application is allowed to issue tokens for the requested
Types ¶
This section is empty.