mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
feat: implement register Passkey user API v2 (#5873)
* command/crypto: DRY the code - reuse the the algorithm switch to create a secret generator - add a verifyCryptoCode function * command: crypto code tests * migrate webauthn package * finish integration tests with webauthn mock client
This commit is contained in:
29
internal/domain/user_v2_passkey.go
Normal file
29
internal/domain/user_v2_passkey.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package domain
|
||||
|
||||
import "io"
|
||||
|
||||
type PasskeyURLData struct {
|
||||
UserID string
|
||||
OrgID string
|
||||
CodeID string
|
||||
Code string
|
||||
}
|
||||
|
||||
// RenderPasskeyURLTemplate parses and renders tmpl.
|
||||
// userID, orgID, codeID and code are passed into the [PasskeyURLData].
|
||||
func RenderPasskeyURLTemplate(w io.Writer, tmpl, userID, orgID, codeID, code string) error {
|
||||
return renderURLTemplate(w, tmpl, &PasskeyURLData{userID, orgID, codeID, code})
|
||||
}
|
||||
|
||||
type PasskeyCodeDetails struct {
|
||||
*ObjectDetails
|
||||
CodeID string
|
||||
Code string
|
||||
}
|
||||
|
||||
type PasskeyRegistrationDetails struct {
|
||||
*ObjectDetails
|
||||
|
||||
PasskeyID string
|
||||
PublicKeyCredentialCreationOptions []byte
|
||||
}
|
Reference in New Issue
Block a user