soulfire.client_connect.ClientService¶
- class soulfire.client_connect.ClientService[source]¶
Bases:
ProtocolService for managing client/user-specific operations. All methods in this service operate on the currently authenticated user, identified via the JWT token in the Authorization header. Each method requires a specific GlobalPermission to be granted to the user.
- async get_client_data(request: soulfire.client_pb2.ClientDataRequest, ctx: connectrpc.request.RequestContext[soulfire.client_pb2.ClientDataRequest, soulfire.client_pb2.ClientDataResponse], /) soulfire.client_pb2.ClientDataResponse[source]¶
Retrieves comprehensive data about the authenticated client and the server. Returns user profile information, granted permissions, and server metadata. Required permission: READ_CLIENT_DATA Error cases:
PERMISSION_DENIED: User lacks READ_CLIENT_DATA permission
INTERNAL: Server error while fetching client data
- async generate_web_dav_token(request: soulfire.client_pb2.GenerateWebDAVTokenRequest, ctx: connectrpc.request.RequestContext[soulfire.client_pb2.GenerateWebDAVTokenRequest, soulfire.client_pb2.GenerateWebDAVTokenResponse], /) soulfire.client_pb2.GenerateWebDAVTokenResponse[source]¶
Generates a new JWT token specifically for WebDAV authentication. The generated token has the “webdav” audience and can only be used for WebDAV access. Required permission: GENERATE_SELF_WEBDAV_TOKEN Error cases:
PERMISSION_DENIED: User lacks GENERATE_SELF_WEBDAV_TOKEN permission
INTERNAL: Server error while generating token (e.g., user not found)
- async generate_api_token(request: soulfire.client_pb2.GenerateAPITokenRequest, ctx: connectrpc.request.RequestContext[soulfire.client_pb2.GenerateAPITokenRequest, soulfire.client_pb2.GenerateAPITokenResponse], /) soulfire.client_pb2.GenerateAPITokenResponse[source]¶
Generates a new JWT token for API authentication. The generated token has the “api” audience and can be used for gRPC/HTTP API calls. Required permission: GENERATE_SELF_API_TOKEN Error cases:
PERMISSION_DENIED: User lacks GENERATE_SELF_API_TOKEN permission
INTERNAL: Server error while generating token (e.g., user not found)
- async update_self_username(request: soulfire.client_pb2.UpdateSelfUsernameRequest, ctx: connectrpc.request.RequestContext[soulfire.client_pb2.UpdateSelfUsernameRequest, soulfire.client_pb2.UpdateSelfUsernameResponse], /) soulfire.client_pb2.UpdateSelfUsernameResponse[source]¶
Updates the username of the currently authenticated user. The change is persisted to the database immediately. Required permission: UPDATE_SELF_USERNAME Error cases:
PERMISSION_DENIED: User lacks UPDATE_SELF_USERNAME permission
INTERNAL: Server error while updating (e.g., user not found in database)
- async update_self_email(request: soulfire.client_pb2.UpdateSelfEmailRequest, ctx: connectrpc.request.RequestContext[soulfire.client_pb2.UpdateSelfEmailRequest, soulfire.client_pb2.UpdateSelfEmailResponse], /) soulfire.client_pb2.UpdateSelfEmailResponse[source]¶
Updates the email address of the currently authenticated user. The change is persisted to the database immediately. Required permission: UPDATE_SELF_EMAIL Error cases:
PERMISSION_DENIED: User lacks UPDATE_SELF_EMAIL permission
INTERNAL: Server error while updating (e.g., user not found in database)
- async invalidate_self_sessions(request: soulfire.client_pb2.InvalidateSelfSessionsRequest, ctx: connectrpc.request.RequestContext[soulfire.client_pb2.InvalidateSelfSessionsRequest, soulfire.client_pb2.InvalidateSelfSessionsResponse], /) soulfire.client_pb2.InvalidateSelfSessionsResponse[source]¶
Invalidates all existing sessions for the currently authenticated user. This is done by setting the user’s minIssuedAt timestamp to the current time, which causes all previously issued JWT tokens to become invalid. After calling this method, the user will need to re-authenticate on all devices. Required permission: INVALIDATE_SELF_SESSIONS Error cases:
PERMISSION_DENIED: User lacks INVALIDATE_SELF_SESSIONS permission
INTERNAL: Server error while invalidating sessions (e.g., user not found)