Documentation
¶
Index ¶
- Variables
- func NewStateToken() (stateToken string, stateTokenHash string)
- type Store
- func (s *Store) GenerateState(ctx context.Context, state *WebappOAuthState) (stateToken string, err error)
- func (s *Store) PopAndRecoverState(ctx context.Context, stateToken string) (state *WebappOAuthState, err error)
- func (s *Store) RecoverState(ctx context.Context, stateToken string) (state *WebappOAuthState, err error)
- type WebappOAuthState
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrOAuthStateInvalid = apierrors.NewInvalid("invalid state")
Functions ¶
func NewStateToken ¶
Types ¶
type Store ¶
type Store struct {
Redis *globalredis.Handle
}
func (*Store) GenerateState ¶
func (*Store) PopAndRecoverState ¶
func (*Store) RecoverState ¶
type WebappOAuthState ¶
type WebappOAuthState struct {
AppID string `json:"app_id"`
UIImplementation config.UIImplementation `json:"ui_implementation"`
WebSessionID string `json:"web_session_id"`
ProviderAlias string `json:"provider_alias"`
// authflow, authflowv2 specific fields
XStep string `json:"x_step"`
ErrorRedirectURI string `json:"error_redirect_uri"`
// account management specific fields
AccountManagementToken string `json:"account_management_token,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.