Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashUCANToken ¶
Blake3 is the chosen hash function for Sonr's WebAuthn implementation. This is a wrapper around the blake3 hash function. We use this to generate the challenge for the WebAuthn session.
Algorithm = blake3(jwkClaims(mpc-share-cid))
- Wallet is generated using MPC protocol
- Vault encrypts and stores shares into IPFS
- JWK Created from the Associated UCAN for Wallet CIDs
- Blake3 is used to generate the hash of the JWK claims for the WebAuthn challenge
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