pws reset
This commit is contained in:
@@ -7,8 +7,8 @@ import "common.proto";
|
||||
service AuthService {
|
||||
rpc Register(RegisterRequest) returns (AuthResponse);
|
||||
rpc Login(LoginRequest) returns (LoginResponse);
|
||||
// Claims a bootstrap account that has never had a password set.
|
||||
rpc SetInitialPassword(SetInitialPasswordRequest) returns (AuthResponse);
|
||||
// Changes the authenticated user's password after verifying the current one.
|
||||
rpc ChangePassword(ChangePasswordRequest) returns (PasswordOperationResponse);
|
||||
rpc GetAuthorization(GetAuthorizationRequest) returns (AuthorizationSnapshot);
|
||||
rpc SetTimezone(SetTimezoneRequest) returns (UserPreferences);
|
||||
|
||||
@@ -26,6 +26,8 @@ service AuthService {
|
||||
|
||||
// User administration.
|
||||
rpc AssignUserRole(AssignUserRoleRequest) returns (UserSummary);
|
||||
// Resets a lower-ranked user's password.
|
||||
rpc ResetUserPassword(ResetUserPasswordRequest) returns (PasswordOperationResponse);
|
||||
rpc ListUsers(ListUsersRequest) returns (ListUsersResponse);
|
||||
}
|
||||
|
||||
@@ -45,12 +47,14 @@ message AuthResponse {
|
||||
string role = 4; // Always 'guest' for a self-registration
|
||||
}
|
||||
|
||||
message SetInitialPasswordRequest {
|
||||
string username = 1;
|
||||
string password = 2;
|
||||
string password_confirmation = 3;
|
||||
message ChangePasswordRequest {
|
||||
string current_password = 1;
|
||||
string new_password = 2;
|
||||
string new_password_confirmation = 3;
|
||||
}
|
||||
|
||||
message PasswordOperationResponse {}
|
||||
|
||||
message LoginRequest {
|
||||
string identifier = 1; // Can be username or email
|
||||
string password = 2;
|
||||
@@ -175,6 +179,12 @@ message AssignUserRoleRequest {
|
||||
string role = 2;
|
||||
}
|
||||
|
||||
message ResetUserPasswordRequest {
|
||||
string username = 1;
|
||||
string new_password = 2;
|
||||
string new_password_confirmation = 3;
|
||||
}
|
||||
|
||||
message UserSummary {
|
||||
string id = 1;
|
||||
string username = 2;
|
||||
|
||||
Reference in New Issue
Block a user