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:
19
internal/domain/url_template.go
Normal file
19
internal/domain/url_template.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package domain
|
||||
|
||||
import (
|
||||
"io"
|
||||
"text/template"
|
||||
|
||||
caos_errs "github.com/zitadel/zitadel/internal/errors"
|
||||
)
|
||||
|
||||
func renderURLTemplate(w io.Writer, tmpl string, data any) error {
|
||||
parsed, err := template.New("").Parse(tmpl)
|
||||
if err != nil {
|
||||
return caos_errs.ThrowInvalidArgument(err, "DOMAIN-oGh5e", "Errors.User.InvalidURLTemplate")
|
||||
}
|
||||
if err = parsed.Execute(w, data); err != nil {
|
||||
return caos_errs.ThrowInvalidArgument(err, "DOMAIN-ieYa7", "Errors.User.InvalidURLTemplate")
|
||||
}
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user