Class MCAuthServiceGrpc.MCAuthServiceStub
java.lang.Object
io.grpc.stub.AbstractStub<MCAuthServiceGrpc.MCAuthServiceStub>
io.grpc.stub.AbstractAsyncStub<MCAuthServiceGrpc.MCAuthServiceStub>
com.soulfiremc.grpc.generated.MCAuthServiceGrpc.MCAuthServiceStub
- Enclosing class:
MCAuthServiceGrpc
public static final class MCAuthServiceGrpc.MCAuthServiceStub
extends io.grpc.stub.AbstractAsyncStub<MCAuthServiceGrpc.MCAuthServiceStub>
A stub to allow clients to do asynchronous rpc calls to service MCAuthService.
Service for authenticating Minecraft accounts for use with SoulFire bots. Supports multiple authentication methods including Microsoft OAuth (credentials and device code flows) and offline mode. All methods require the caller to have AUTHENTICATE_MC_ACCOUNT permission for the target instance. Authentication may optionally use proxies if configured in instance settings (USE_PROXIES_FOR_ACCOUNT_AUTH). All authentication operations have timeouts to prevent indefinite hangs (2 minutes for credentials/refresh, 15 minutes for device code flow).
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T> -
Method Summary
Modifier and TypeMethodDescriptionprotected MCAuthServiceGrpc.MCAuthServiceStubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions) voidloginCredentials(CredentialsAuthRequest request, io.grpc.stub.StreamObserver<CredentialsAuthResponse> responseObserver) Authenticates one or more Minecraft accounts using credentials or tokens.voidloginDeviceCode(DeviceCodeAuthRequest request, io.grpc.stub.StreamObserver<DeviceCodeAuthResponse> responseObserver) Authenticates a Minecraft account using the Microsoft OAuth device code flow.voidrefresh(RefreshRequest request, io.grpc.stub.StreamObserver<RefreshResponse> responseObserver) Refreshes the authentication tokens for an existing Minecraft account.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 MCAuthServiceGrpc.MCAuthServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
buildin classio.grpc.stub.AbstractStub<MCAuthServiceGrpc.MCAuthServiceStub>
-
loginCredentials
public void loginCredentials(CredentialsAuthRequest request, io.grpc.stub.StreamObserver<CredentialsAuthResponse> responseObserver) 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) 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) 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
-