Documentation
¶
Index ¶
- type Option
- type Session
- func (s *Session) Apply(opts ...Option) error
- func (s *Session) AuthorizeCredential(credentialRequestData string) (*v1.LoginResponse, error)
- func (s *Session) GetAssertionOptions() (*v1.AssertResponse, error)
- func (s *Session) GetChallengeResponse() (*v1.ChallengeResponse, error)
- func (s *Session) RegisterCredential(credentialCreationData string) (*v1.RegisterResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option is a function that configures a session
func WithAttestionPreference ¶
func WithAttestionPreference(pref protocol.ConveyancePreference) Option
WithAttestionPreference sets the AttestionPreference
func WithAuthenticatorSelect ¶
func WithAuthenticatorSelect(selectAuth protocol.AuthenticatorSelection) Option
WithAuthenticatorSelect sets the AuthenticatorSelect
type Session ¶
type Session struct {
AKA string
// contains filtered or unexported fields
}
`Session` is a struct that contains a `string` (`ID`), a `string` (`RPID`), a `common.WebauthnCredential` (`WebauthnCredential`), a `types.DidDocument` (`DidDoc`), a `webauthn.SessionData` (`Data`), and a `string` (`AlsoKnownAs`). @property {string} ID - The session ID. @property {string} RPID - The Relying Party ID. This is the domain of the relying party. @property WebauthnCredential - This is the credential that was created by the user. @property DidDoc - The DID Document of the user. @property Data - This is the data that is returned from the webauthn.Create() function. @property {string} AlsoKnownAs - The user's username.
func NewSession ¶
NewSession creates a new session with challenge to be used to register a new account
func (*Session) AuthorizeCredential ¶
func (s *Session) AuthorizeCredential(credentialRequestData string) (*v1.LoginResponse, error)
AuthorizeCredential authenticates from the signature provided to the client
func (*Session) GetAssertionOptions ¶
func (s *Session) GetAssertionOptions() (*v1.AssertResponse, error)
GetAssertionOptions creates a new AssertionChallenge for client to verify
func (*Session) GetChallengeResponse ¶
func (s *Session) GetChallengeResponse() (*v1.ChallengeResponse, error)
BeginRegistration starts the registration process for the underlying Webauthn instance
func (*Session) RegisterCredential ¶
func (s *Session) RegisterCredential(credentialCreationData string) (*v1.RegisterResponse, error)
RegisterCredential creates a credential which can be stored to use with User Authentication