Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowCredential ¶
type AllowCredential struct { Type string `json:"type"` ID string `json:"id"` Transports []CredentialTransport `json:"transports"` }
type AllowCredentials ¶
type AllowCredentials struct { Key []AllowCredential `json:"key"` Webauthn []AllowCredential `json:"webauthn"` }
type AsymmetricKeySigner ¶
type AsymmetricKeySigner struct {
*AsymmetricKeySignerConfig
}
func NewAsymmetricKeySigner ¶
func NewAsymmetricKeySigner(config *AsymmetricKeySignerConfig) *AsymmetricKeySigner
func (*AsymmetricKeySigner) Sign ¶
func (signer *AsymmetricKeySigner) Sign(challenge string, allowCredentials *AllowCredentials) (*KeyAssertion, error)
Sign signs the given challenge using the private key and the hashing algorithm specified in the Algorithm field. If the Algorithm field is not set or invalid, it defaults to SHA256.
type CredentialAssertion ¶
type CredentialTransport ¶
type CredentialTransport string
const ( USB CredentialTransport = "usb" NFC CredentialTransport = "nfc" BLE CredentialTransport = "ble" Internal CredentialTransport = "internal" )
type ICredentialSigner ¶
type ICredentialSigner interface {
Sign(challenge string, allowCredential *AllowCredentials) (*KeyAssertion, error)
}
For not it returns a KeyAssertion. But we can make it more generic afterward
type KeyAssertion ¶
type KeyAssertion struct { Kind CredentialKind `json:"kind"` CredentialAssertion CredentialAssertion `json:"credentialAssertion"` }
Click to show internal directories.
Click to hide internal directories.