Class ClientServiceImpl
java.lang.Object
com.soulfiremc.grpc.generated.ClientServiceGrpc.ClientServiceImplBase
com.soulfiremc.server.grpc.ClientServiceImpl
- All Implemented Interfaces:
ClientServiceGrpc.AsyncService, io.grpc.BindableService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerateAPIToken(GenerateAPITokenRequest request, io.grpc.stub.StreamObserver<GenerateAPITokenResponse> responseObserver) Generates a new JWT token for API authentication.voidgenerateWebDAVToken(GenerateWebDAVTokenRequest request, io.grpc.stub.StreamObserver<GenerateWebDAVTokenResponse> responseObserver) Generates a new JWT token specifically for WebDAV authentication.voidgetClientData(ClientDataRequest request, io.grpc.stub.StreamObserver<ClientDataResponse> responseObserver) Retrieves comprehensive data about the authenticated client and the server.voidinvalidateSelfSessions(InvalidateSelfSessionsRequest request, io.grpc.stub.StreamObserver<InvalidateSelfSessionsResponse> responseObserver) Invalidates all existing sessions for the currently authenticated user.voidupdateSelfEmail(UpdateSelfEmailRequest request, io.grpc.stub.StreamObserver<UpdateSelfEmailResponse> responseObserver) Updates the email address of the currently authenticated user.voidupdateSelfUsername(UpdateSelfUsernameRequest request, io.grpc.stub.StreamObserver<UpdateSelfUsernameResponse> responseObserver) Updates the username of the currently authenticated user.Methods inherited from class ClientServiceGrpc.ClientServiceImplBase
bindService
-
Constructor Details
-
ClientServiceImpl
-
-
Method Details
-
getClientData
public void getClientData(ClientDataRequest request, io.grpc.stub.StreamObserver<ClientDataResponse> responseObserver) Description copied from interface:ClientServiceGrpc.AsyncServiceRetrieves 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
-
generateWebDAVToken
public void generateWebDAVToken(GenerateWebDAVTokenRequest request, io.grpc.stub.StreamObserver<GenerateWebDAVTokenResponse> responseObserver) Description copied from interface:ClientServiceGrpc.AsyncServiceGenerates 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)
-
generateAPIToken
public void generateAPIToken(GenerateAPITokenRequest request, io.grpc.stub.StreamObserver<GenerateAPITokenResponse> responseObserver) Description copied from interface:ClientServiceGrpc.AsyncServiceGenerates 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)
-
updateSelfUsername
public void updateSelfUsername(UpdateSelfUsernameRequest request, io.grpc.stub.StreamObserver<UpdateSelfUsernameResponse> responseObserver) Description copied from interface:ClientServiceGrpc.AsyncServiceUpdates 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)
-
updateSelfEmail
public void updateSelfEmail(UpdateSelfEmailRequest request, io.grpc.stub.StreamObserver<UpdateSelfEmailResponse> responseObserver) Description copied from interface:ClientServiceGrpc.AsyncServiceUpdates 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)
-
invalidateSelfSessions
public void invalidateSelfSessions(InvalidateSelfSessionsRequest request, io.grpc.stub.StreamObserver<InvalidateSelfSessionsResponse> responseObserver) Description copied from interface:ClientServiceGrpc.AsyncServiceInvalidates 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)
-