mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 21:27:22 +00:00
parent
6aa0588fe0
commit
055cdf98ed
@ -67,7 +67,7 @@ export ZITADEL_SHORT_CACHE_SHARED_MAXAGE=15m
|
||||
export ZITADEL_CONSOLE_ENV_DIR=../../console/src/assets/
|
||||
|
||||
#Org
|
||||
export ZITADEL_DEFAULT_DOMAIN=zitadel.ch
|
||||
export ZITADEL_DEFAULT_DOMAIN=localhost
|
||||
|
||||
|
||||
#Setup
|
||||
|
@ -160,12 +160,12 @@
|
||||
"TITLE": "Passwortlose Authentifizierungsmethoden",
|
||||
"DESCRIPTION": "Füge WebAuthn kompatible Authentifikatoren hinzu um dich passwortlos anzumelden.",
|
||||
"MANAGE_DESCRIPTION": "Verwalte die Multifaktor-Merkmale Deiner Benutzer.",
|
||||
"U2F":"U2F hinzufügen",
|
||||
"U2F_DIALOG_TITLE": "U2F hinzufügen",
|
||||
"U2F":"Authentifikator hinzufügen",
|
||||
"U2F_DIALOG_TITLE": "Authentifikator hinzufügen",
|
||||
"U2F_DIALOG_DESCRIPTION": "Gib einen Namen für den von dir verwendeten Login an.",
|
||||
"U2F_SUCCESS":"Passwordless erfolgreich erstellt!",
|
||||
"U2F_ERROR":"Ein Fehler ist aufgetreten!",
|
||||
"U2F_NAME":"U2F Name",
|
||||
"U2F_NAME":"Authentifikator Name",
|
||||
"TYPE": {
|
||||
"0":"Keine MFA definiert",
|
||||
"1":"OTP",
|
||||
|
@ -160,12 +160,12 @@
|
||||
"TITLE": "Passwordless Authentication",
|
||||
"DESCRIPTION": "Add WebAuthn based Authentication Methods to log onto ZITADEL passwordless.",
|
||||
"MANAGE_DESCRIPTION": "Manage the second factor methods of your users.",
|
||||
"U2F":"Add U2F",
|
||||
"U2F_DIALOG_TITLE": "Verify U2F",
|
||||
"U2F":"Add authenticator",
|
||||
"U2F_DIALOG_TITLE": "Verify authenticator",
|
||||
"U2F_DIALOG_DESCRIPTION": "Enter a name for your used passwordless Login",
|
||||
"U2F_SUCCESS":"Passwordless Auth created successfully!",
|
||||
"U2F_ERROR":"An error during U2F setup occurred!",
|
||||
"U2F_NAME":"U2F Name",
|
||||
"U2F_NAME":"Authenticator Name",
|
||||
"TYPE": {
|
||||
"0": "No MFA defined",
|
||||
"1": "OTP",
|
||||
|
@ -163,6 +163,9 @@ func (s *Server) RemoveMfaOTP(ctx context.Context, _ *empty.Empty) (_ *empty.Emp
|
||||
|
||||
func (s *Server) AddMyMfaU2F(ctx context.Context, _ *empty.Empty) (_ *auth.WebAuthNResponse, err error) {
|
||||
u2f, err := s.repo.AddMyMFAU2F(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return verifyWebAuthNFromModel(u2f), err
|
||||
}
|
||||
|
||||
@ -186,6 +189,9 @@ func (s *Server) GetMyPasswordless(ctx context.Context, _ *empty.Empty) (_ *auth
|
||||
|
||||
func (s *Server) AddMyPasswordless(ctx context.Context, _ *empty.Empty) (_ *auth.WebAuthNResponse, err error) {
|
||||
u2f, err := s.repo.AddMyPasswordless(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return verifyWebAuthNFromModel(u2f), err
|
||||
}
|
||||
|
||||
|
@ -17,11 +17,12 @@ type WebAuthNToken struct {
|
||||
Challenge string `json:"challenge"`
|
||||
State int32 `json:"-"`
|
||||
|
||||
KeyID []byte `json:"keyId"`
|
||||
PublicKey []byte `json:"publicKey"`
|
||||
AttestationType string `json:"attestationType"`
|
||||
AAGUID []byte `json:"aaguid"`
|
||||
SignCount uint32 `json:"signCount"`
|
||||
KeyID []byte `json:"keyId"`
|
||||
PublicKey []byte `json:"publicKey"`
|
||||
AttestationType string `json:"attestationType"`
|
||||
AAGUID []byte `json:"aaguid"`
|
||||
SignCount uint32 `json:"signCount"`
|
||||
WebAuthNTokenName string `json:"webAuthNTokenName"`
|
||||
}
|
||||
|
||||
type WebAuthNVerify struct {
|
||||
@ -79,29 +80,31 @@ func WebAuthNsFromModel(u2fs []*model.WebAuthNToken) []*WebAuthNToken {
|
||||
|
||||
func WebAuthNFromModel(webAuthN *model.WebAuthNToken) *WebAuthNToken {
|
||||
return &WebAuthNToken{
|
||||
ObjectRoot: webAuthN.ObjectRoot,
|
||||
WebauthNTokenID: webAuthN.WebAuthNTokenID,
|
||||
Challenge: webAuthN.Challenge,
|
||||
State: int32(webAuthN.State),
|
||||
KeyID: webAuthN.KeyID,
|
||||
PublicKey: webAuthN.PublicKey,
|
||||
AAGUID: webAuthN.AAGUID,
|
||||
SignCount: webAuthN.SignCount,
|
||||
AttestationType: webAuthN.AttestationType,
|
||||
ObjectRoot: webAuthN.ObjectRoot,
|
||||
WebauthNTokenID: webAuthN.WebAuthNTokenID,
|
||||
Challenge: webAuthN.Challenge,
|
||||
State: int32(webAuthN.State),
|
||||
KeyID: webAuthN.KeyID,
|
||||
PublicKey: webAuthN.PublicKey,
|
||||
AAGUID: webAuthN.AAGUID,
|
||||
SignCount: webAuthN.SignCount,
|
||||
AttestationType: webAuthN.AttestationType,
|
||||
WebAuthNTokenName: webAuthN.WebAuthNTokenName,
|
||||
}
|
||||
}
|
||||
|
||||
func WebAuthNToModel(webAuthN *WebAuthNToken) *model.WebAuthNToken {
|
||||
return &model.WebAuthNToken{
|
||||
ObjectRoot: webAuthN.ObjectRoot,
|
||||
WebAuthNTokenID: webAuthN.WebauthNTokenID,
|
||||
Challenge: webAuthN.Challenge,
|
||||
State: model.MFAState(webAuthN.State),
|
||||
KeyID: webAuthN.KeyID,
|
||||
PublicKey: webAuthN.PublicKey,
|
||||
AAGUID: webAuthN.AAGUID,
|
||||
SignCount: webAuthN.SignCount,
|
||||
AttestationType: webAuthN.AttestationType,
|
||||
ObjectRoot: webAuthN.ObjectRoot,
|
||||
WebAuthNTokenID: webAuthN.WebauthNTokenID,
|
||||
Challenge: webAuthN.Challenge,
|
||||
State: model.MFAState(webAuthN.State),
|
||||
KeyID: webAuthN.KeyID,
|
||||
PublicKey: webAuthN.PublicKey,
|
||||
AAGUID: webAuthN.AAGUID,
|
||||
SignCount: webAuthN.SignCount,
|
||||
AttestationType: webAuthN.AttestationType,
|
||||
WebAuthNTokenName: webAuthN.WebAuthNTokenName,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -374,7 +374,7 @@ func (u *UserView) addPasswordlessToken(event *models.Event) error {
|
||||
}
|
||||
}
|
||||
token.State = int32(model.MFAStateNotReady)
|
||||
u.U2FTokens = append(u.U2FTokens, token)
|
||||
u.PasswordlessTokens = append(u.PasswordlessTokens, token)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user