Class MCAuthServiceImpl

All Implemented Interfaces:
MCAuthServiceGrpc.AsyncService, io.grpc.BindableService

public final class MCAuthServiceImpl extends MCAuthServiceGrpc.MCAuthServiceImplBase
  • Constructor Details

    • MCAuthServiceImpl

      public MCAuthServiceImpl(SoulFireServer soulFireServer)
  • Method Details

    • loginCredentials

      public void loginCredentials(CredentialsAuthRequest request, io.grpc.stub.StreamObserver<CredentialsAuthResponse> casted)
      Description copied from interface: MCAuthServiceGrpc.AsyncService
      Authenticates one or more Minecraft accounts using credentials or tokens.
      Supports bulk authentication with concurrent processing.
      The stream sends progress updates (one_success/one_failure) as each
      account is processed, allowing clients to show real-time progress.
      The final message contains the full list of successfully authenticated accounts.
      Errors:
      - NOT_FOUND: The specified instance does not exist
      - PERMISSION_DENIED: Caller lacks AUTHENTICATE_MC_ACCOUNT permission
      - INTERNAL: Authentication error (logged server-side with details)
      Timeout: 2 minutes per account
      
    • loginDeviceCode

      public void loginDeviceCode(DeviceCodeAuthRequest request, io.grpc.stub.StreamObserver<DeviceCodeAuthResponse> responseObserver)
      Description copied from interface: MCAuthServiceGrpc.AsyncService
      Authenticates a Minecraft account using the Microsoft OAuth device code flow.
      This is an interactive flow that requires user action in a web browser.
      The stream first sends a DeviceCode message containing the verification
      URL and user code. The client should display this to the user. Once the
      user completes authorization in their browser, the stream sends the
      authenticated account and completes.
      Errors:
      - NOT_FOUND: The specified instance does not exist
      - PERMISSION_DENIED: Caller lacks AUTHENTICATE_MC_ACCOUNT permission
      - INTERNAL: Authentication error (e.g., user denied access, timeout)
      Timeout: 15 minutes (Microsoft device codes typically expire after this)
      
    • refresh

      public void refresh(RefreshRequest request, io.grpc.stub.StreamObserver<RefreshResponse> responseObserver)
      Description copied from interface: MCAuthServiceGrpc.AsyncService
      Refreshes the authentication tokens for an existing Minecraft account.
      Used to renew expired access tokens using stored refresh tokens.
      For Microsoft accounts, this refreshes the Minecraft token, profile,
      and player certificates. For offline accounts, returns the account
      unchanged (offline accounts never expire).
      Errors:
      - NOT_FOUND: The specified instance does not exist
      - PERMISSION_DENIED: Caller lacks AUTHENTICATE_MC_ACCOUNT permission
      - INTERNAL: Refresh error (e.g., refresh token expired or revoked)
      Timeout: 2 minutes