Class ClientServiceGrpc.ClientServiceStub
java.lang.Object
io.grpc.stub.AbstractStub<ClientServiceGrpc.ClientServiceStub>
io.grpc.stub.AbstractAsyncStub<ClientServiceGrpc.ClientServiceStub>
com.soulfiremc.grpc.generated.ClientServiceGrpc.ClientServiceStub
- Enclosing class:
ClientServiceGrpc
public static final class ClientServiceGrpc.ClientServiceStub
extends io.grpc.stub.AbstractAsyncStub<ClientServiceGrpc.ClientServiceStub>
A stub to allow clients to do asynchronous rpc calls to service ClientService.
Service 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T> -
Method Summary
Modifier and TypeMethodDescriptionprotected ClientServiceGrpc.ClientServiceStubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions) voidgenerateAPIToken(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 io.grpc.stub.AbstractAsyncStub
newStub, newStubMethods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady
-
Method Details
-
build
protected ClientServiceGrpc.ClientServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
buildin classio.grpc.stub.AbstractStub<ClientServiceGrpc.ClientServiceStub>
-
getClientData
public void getClientData(ClientDataRequest request, io.grpc.stub.StreamObserver<ClientDataResponse> responseObserver) 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
-
generateWebDAVToken
public void generateWebDAVToken(GenerateWebDAVTokenRequest request, io.grpc.stub.StreamObserver<GenerateWebDAVTokenResponse> responseObserver) 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)
-
generateAPIToken
public void generateAPIToken(GenerateAPITokenRequest request, io.grpc.stub.StreamObserver<GenerateAPITokenResponse> responseObserver) 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)
-
updateSelfUsername
public void updateSelfUsername(UpdateSelfUsernameRequest request, io.grpc.stub.StreamObserver<UpdateSelfUsernameResponse> responseObserver) 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)
-
updateSelfEmail
public void updateSelfEmail(UpdateSelfEmailRequest request, io.grpc.stub.StreamObserver<UpdateSelfEmailResponse> responseObserver) 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)
-
invalidateSelfSessions
public void invalidateSelfSessions(InvalidateSelfSessionsRequest request, io.grpc.stub.StreamObserver<InvalidateSelfSessionsResponse> responseObserver) 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)
-