Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSessionNotFound = errors.New("session not found")
Functions ¶
This section is empty.
Types ¶
type AuthzClientSession ¶
type AuthzClientSession struct {
ID string `json:"id"`
OPIssuer string `json:"op_issuer"`
State string `json:"state"`
Nonce string `json:"nonce"`
Verifier string `json:"verifier"`
AuthURL string `json:"auth_url"`
TokenResponse *oauth2.TokenResponse `json:"token_response"`
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
}
type AuthzClientSessionStore ¶
type AuthzClientSessionStore interface {
GetAuthzClientSessionByID(id string) (*AuthzClientSession, error)
GetAuthzClientSessionByState(state string) (*AuthzClientSession, error)
SaveAuthzClientSession(session *AuthzClientSession) error
DeleteAuthzClientSession(state string) error
}
func NewMockAuthzClientSessionStore ¶
func NewMockAuthzClientSessionStore() AuthzClientSessionStore
type Client ¶
type Client struct {
ClientID string
RedirectURI string
Scopes []string
ServerMetadata oauth2.ServerMetadata
// contains filtered or unexported fields
}
func NewFromServerMetadata ¶
func NewFromServerMetadata(serverMetadata oauth2.ServerMetadata) (*Client, error)
func (*Client) AuthCodeURL ¶
func (*Client) Exchange ¶
func (cl *Client) Exchange(code, verifier string, opts ...oauth2.ParameterOption) (*oauth2.TokenResponse, error)
func (*Client) MountRoutes ¶
Click to show internal directories.
Click to hide internal directories.