Documentation
¶
Overview ¶
Package implicitoauth2 contains the basic functionality to realize an Implicit Grant OAuth2 authentication
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthTokenURL ¶
AuthTokenURL is a function to retrieve the URL to request the Token with by the Implicit Grant OAuth2 authentication
func ImplicitGrantRequestErrorSuccessful ¶
ImplicitGrantRequestErrorSuccessful checks if the error occurred is the error indicating a successful redirect which is returned as error since we cancel the request the moment we reach it
Types ¶
type ImplicitGrant ¶
type ImplicitGrant struct { ImplicitGrantInterface Client *http.Client Config *oauth2.Config }
ImplicitGrant implements the ImplicitGrantInterface and provides a basic token function using the interface methods
type ImplicitGrantInterface ¶
type ImplicitGrantInterface interface { Login() error Authorize() error Token() (*oauth2.Token, error) }
ImplicitGrantInterface defines all required methods for an implicit grant OAuth2 process
type ImplicitGrantRedirect ¶
ImplicitGrantRedirect is a custom error we return when we got successfully redirected to a Token URL
func (ImplicitGrantRedirect) Error ¶
func (r ImplicitGrantRedirect) Error() string
Error is the implementation of the default output of the error interface
type ImplicitGrantTokenSource ¶
type ImplicitGrantTokenSource struct { Grant ImplicitGrantInterface // contains filtered or unexported fields }
ImplicitGrantTokenSource is the interface implementation of the oauth2.TokenSource interface