Documentation
¶
Index ¶
- type IdentityProvider
- func (c IdentityProvider) GenerateLoginURL() string
- func (c IdentityProvider) Logout(refreshToken string) error
- func (c IdentityProvider) VerifyIdentity(ctx context.Context, code, state string) (*credentials.Credentials, error)
- func (c IdentityProvider) VerifyIdentityForOperator(ctx context.Context, code, state string) (*xoauth2.Token, error)
- type IdentityProviderI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdentityProvider ¶
type IdentityProvider struct { KeyFunc oauth2.StateKeyFunc Client *oauth2.Provider RoleARN string }
IdentityProvider Identity implementation
Define the structure of a IdentityProvider with Client inside and define the functions that are used during the authentication flow.
func (IdentityProvider) GenerateLoginURL ¶
func (c IdentityProvider) GenerateLoginURL() string
GenerateLoginURL returns a new URL used by the user to login against the idp
func (IdentityProvider) Logout ¶
func (c IdentityProvider) Logout(refreshToken string) error
Logout ends session on IDP
func (IdentityProvider) VerifyIdentity ¶
func (c IdentityProvider) VerifyIdentity(ctx context.Context, code, state string) (*credentials.Credentials, error)
VerifyIdentity will verify the user identity against the idp using the authorization code flow
func (IdentityProvider) VerifyIdentityForOperator ¶
func (c IdentityProvider) VerifyIdentityForOperator(ctx context.Context, code, state string) (*xoauth2.Token, error)
VerifyIdentityForOperator will verify the user identity against the idp using the authorization code flow
type IdentityProviderI ¶
type IdentityProviderI interface { VerifyIdentity(ctx context.Context, code, state string) (*credentials.Credentials, error) VerifyIdentityForOperator(ctx context.Context, code, state string) (*xoauth2.Token, error) GenerateLoginURL() string Logout(refreshToken string) error }
IdentityProviderI interface with all functions to be implemented by mock when testing, it should include all IdentityProvider respective api calls that are used within this project.