Skip to content

Commit

Permalink
feat: expose credential parameter configuration (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev authored Jun 30, 2022
1 parent e5f56db commit 46f365d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions webauthn/registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ func WithExtensions(extension protocol.AuthenticationExtensions) RegistrationOpt
}
}

// Provide credential parameters to registration options
func WithCredentialParameters(credentialParams []protocol.CredentialParameter) RegistrationOption {
return func(cco *protocol.PublicKeyCredentialCreationOptions) {
cco.Parameters = credentialParams
}
}

// WithAppIdExcludeExtension automatically includes the specified appid if the CredentialExcludeList contains a credential
// with the type `fido-u2f`.
func WithAppIdExcludeExtension(appid string) RegistrationOption {
Expand Down

0 comments on commit 46f365d

Please sign in to comment.