Documentation ¶
Index ¶
- Variables
- type Config
- type ConfigService
- type CreationOptionsService
- type IdentityService
- type RequestOptionsService
- func (s *RequestOptionsService) MakeConditionalRequestOptions() (*model.WebAuthnRequestOptions, error)
- func (s *RequestOptionsService) MakeModalRequestOptions() (*model.WebAuthnRequestOptions, error)
- func (s *RequestOptionsService) MakeModalRequestOptionsWithUser(userID string) (*model.WebAuthnRequestOptions, error)
- type Service
- func (s *Service) ConsumeAssertionResponse(assertionResponse []byte) (err error)
- func (s *Service) ConsumeAttestationResponse(attestationResponse []byte) (err error)
- func (s *Service) GetCredentialIDFromAssertionResponse(assertionResponse []byte) (credentialID string, err error)
- func (s *Service) PeekAssertionResponse(assertionResponse []byte, attestationResponse []byte) (signCount int64, err error)
- func (s *Service) PeekAttestationResponse(attestationResponse []byte) (creationOptions *model.WebAuthnCreationOptions, credentialID string, ...)
- type Session
- type Store
- type TranslationService
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var DependencySet = wire.NewSet( wire.Struct(new(ConfigService), "*"), wire.Struct(new(CreationOptionsService), "*"), wire.Struct(new(RequestOptionsService), "*"), wire.Struct(new(Service), "*"), wire.Struct(new(Store), "*"), )
View Source
var ErrSessionNotFound = apierrors.NotFound.WithReason("WebAuthnSessionNotFound").New("webauthn session not found")
View Source
var ErrUserNotFound = apierrors.NotFound.WithReason("UserNotFound").New("user not found")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { RPID string RPOrigin string RPDisplayName string AttestationPreference protocol.ConveyancePreference AuthenticatorSelection protocol.AuthenticatorSelection MediationModalTimeout int MediationConditionalTimeout int }
type ConfigService ¶
type ConfigService struct { Request *http.Request TrustProxy config.TrustProxy TranslationService TranslationService }
func (*ConfigService) MakeConfig ¶
func (s *ConfigService) MakeConfig() (*Config, error)
type CreationOptionsService ¶
type CreationOptionsService struct { ConfigService *ConfigService UserService UserService IdentityService IdentityService Store *Store }
func (*CreationOptionsService) MakeCreationOptions ¶
func (s *CreationOptionsService) MakeCreationOptions(userID string) (*model.WebAuthnCreationOptions, error)
MakeCreationOptions makes creation options which is ready for use.
type IdentityService ¶
type RequestOptionsService ¶
type RequestOptionsService struct { ConfigService *ConfigService IdentityService IdentityService Store *Store }
func (*RequestOptionsService) MakeConditionalRequestOptions ¶
func (s *RequestOptionsService) MakeConditionalRequestOptions() (*model.WebAuthnRequestOptions, error)
func (*RequestOptionsService) MakeModalRequestOptions ¶
func (s *RequestOptionsService) MakeModalRequestOptions() (*model.WebAuthnRequestOptions, error)
func (*RequestOptionsService) MakeModalRequestOptionsWithUser ¶
func (s *RequestOptionsService) MakeModalRequestOptionsWithUser(userID string) (*model.WebAuthnRequestOptions, error)
type Service ¶
type Service struct { Store *Store ConfigService *ConfigService }
func (*Service) ConsumeAssertionResponse ¶
func (*Service) ConsumeAttestationResponse ¶
func (*Service) GetCredentialIDFromAssertionResponse ¶
func (*Service) PeekAssertionResponse ¶
func (*Service) PeekAttestationResponse ¶
type Session ¶
type Session struct { Challenge protocol.URLEncodedBase64 `json:"challenge"` CreationOptions *model.WebAuthnCreationOptions `json:"creation_options,omitempty"` RequestOptions *model.WebAuthnRequestOptions `json:"request_options,omitempty"` }
Session is an object to associate a challenge with generated options. It is persisted in Redis.
type Store ¶
func (*Store) ConsumeSession ¶
func (s *Store) ConsumeSession(challenge protocol.URLEncodedBase64) (*Session, error)
func (*Store) CreateSession ¶
func (*Store) PeekSession ¶
func (s *Store) PeekSession(challenge protocol.URLEncodedBase64) (*Session, error)
type TranslationService ¶
type UserService ¶
Click to show internal directories.
Click to hide internal directories.