auth revocation implemented

This commit is contained in:
Priec
2026-08-17 13:27:54 +02:00
parent f0d12584ef
commit a80b389a3f
6 changed files with 198 additions and 2 deletions

View File

@@ -12,6 +12,16 @@ service AuthService {
rpc GetAuthorization(GetAuthorizationRequest) returns (AuthorizationSnapshot);
rpc SetTimezone(SetTimezoneRequest) returns (UserPreferences);
// Ends the caller's own sessions. Every token issued to them before this
// call, on every device, stops being accepted -- including the one used to
// make the call, so the caller must log in again afterwards. Discarding a
// token client-side is not a logout; this is.
rpc Logout(LogoutRequest) returns (LogoutResponse);
// Ends every session of another user, for a leaked token or a departing
// account. Requires the struct:user area, and the target must rank strictly
// below the caller.
rpc RevokeUserSessions(RevokeUserSessionsRequest) returns (RevokeUserSessionsResponse);
// Role administration. Every call requires the struct:role area, and every
// target role must rank strictly below the caller's own role.
rpc ListRoles(ListRolesRequest) returns (ListRolesResponse);
@@ -80,6 +90,16 @@ message UserPreferences {
string timezone = 1;
}
message LogoutRequest {}
message LogoutResponse {}
message RevokeUserSessionsRequest {
string username = 1;
}
message RevokeUserSessionsResponse {}
message GetAuthorizationRequest {}
message Permission {