more fix and update

This commit is contained in:
lendry
2026-06-24 20:15:19 +03:00
parent dcab6557d3
commit 9727cf3f35
53 changed files with 3479 additions and 494 deletions

View File

@@ -10,6 +10,8 @@ service AuthService {
rpc VerifyOtp (PasswordlessVerifyRequest) returns (PasswordlessAuthResponse);
rpc LoginWithPassword (PasswordLoginRequest) returns (AuthTokens);
rpc LoginWithLdap (LdapLoginRequest) returns (AuthTokens);
rpc VerifyTotpLogin (VerifyTotpLoginRequest) returns (AuthTokens);
rpc BeginTotpLogin (BeginTotpLoginRequest) returns (BeginTotpLoginResponse);
rpc VerifyPin (VerifyPinRequest) returns (PinVerificationResponse);
rpc GetMe (GetMeRequest) returns (PublicUser);
rpc RefreshSession (RefreshSessionRequest) returns (RefreshSessionResponse);
@@ -43,6 +45,13 @@ message IdentifyResponse {
bool hasPassword = 2;
bool isPinEnabled = 3;
repeated LoginMethod methods = 4;
bool isTotpEnabled = 5;
repeated OtpChannel otpChannels = 6;
}
message OtpChannel {
string channel = 1;
string masked = 2;
}
message LoginMethod {
@@ -54,6 +63,7 @@ message LoginMethod {
message PasswordlessOtpRequest {
string recipient = 1;
optional string channel = 2;
optional string ipAddress = 3;
}
message PasswordlessOtpResponse {
@@ -76,6 +86,8 @@ message PasswordlessAuthResponse {
bool requiresPassword = 1;
optional string tempAuthToken = 2;
optional AuthTokens auth = 3;
bool requiresTotp = 4;
optional string totpChallengeToken = 5;
}
message PasswordLoginRequest {
@@ -99,6 +111,24 @@ message LdapLoginRequest {
optional string userAgent = 7;
}
message VerifyTotpLoginRequest {
string totpChallengeToken = 1;
string code = 2;
}
message BeginTotpLoginRequest {
string recipient = 1;
string fingerprint = 2;
optional string deviceName = 3;
optional string deviceType = 4;
optional string ipAddress = 5;
optional string userAgent = 6;
}
message BeginTotpLoginResponse {
string totpChallengeToken = 1;
}
message VerifyPinRequest {
string sessionId = 1;
string pin = 2;
@@ -163,6 +193,8 @@ message AuthTokens {
bool pinVerified = 4;
PublicUser user = 5;
string sessionId = 6;
bool requiresTotp = 7;
optional string totpChallengeToken = 8;
}
message PinVerificationResponse {