Class ClientServiceGrpc.ClientServiceFutureStub

java.lang.Object
io.grpc.stub.AbstractStub<ClientServiceGrpc.ClientServiceFutureStub>
io.grpc.stub.AbstractFutureStub<ClientServiceGrpc.ClientServiceFutureStub>
com.soulfiremc.grpc.generated.ClientServiceGrpc.ClientServiceFutureStub
Enclosing class:
ClientServiceGrpc

public static final class ClientServiceGrpc.ClientServiceFutureStub extends io.grpc.stub.AbstractFutureStub<ClientServiceGrpc.ClientServiceFutureStub>
A stub to allow clients to do ListenableFuture-style 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.
  • Method Details

    • build

      protected ClientServiceGrpc.ClientServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<ClientServiceGrpc.ClientServiceFutureStub>
    • getClientData

      public com.google.common.util.concurrent.ListenableFuture<ClientDataResponse> getClientData(ClientDataRequest request)
      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 com.google.common.util.concurrent.ListenableFuture<GenerateWebDAVTokenResponse> generateWebDAVToken(GenerateWebDAVTokenRequest request)
      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 com.google.common.util.concurrent.ListenableFuture<GenerateAPITokenResponse> generateAPIToken(GenerateAPITokenRequest request)
      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 com.google.common.util.concurrent.ListenableFuture<UpdateSelfUsernameResponse> updateSelfUsername(UpdateSelfUsernameRequest request)
      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 com.google.common.util.concurrent.ListenableFuture<UpdateSelfEmailResponse> updateSelfEmail(UpdateSelfEmailRequest request)
      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 com.google.common.util.concurrent.ListenableFuture<InvalidateSelfSessionsResponse> invalidateSelfSessions(InvalidateSelfSessionsRequest request)
      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)