Class LoginServiceImpl
java.lang.Object
com.soulfiremc.grpc.generated.LoginServiceGrpc.LoginServiceImplBase
com.soulfiremc.server.grpc.LoginServiceImpl
- All Implemented Interfaces:
LoginServiceGrpc.AsyncService, io.grpc.BindableService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidemailCode(EmailCodeRequest request, io.grpc.stub.StreamObserver<NextAuthFlowResponse> responseObserver) Verifies an email verification code to complete authentication.voidlogin(LoginRequest request, io.grpc.stub.StreamObserver<NextAuthFlowResponse> responseObserver) Initiates a login flow for the specified email address.Methods inherited from class LoginServiceGrpc.LoginServiceImplBase
bindService
-
Constructor Details
-
LoginServiceImpl
-
-
Method Details
-
login
public void login(LoginRequest request, io.grpc.stub.StreamObserver<NextAuthFlowResponse> responseObserver) Description copied from interface:LoginServiceGrpc.AsyncServiceInitiates a login flow for the specified email address. If the email is registered, a six-digit verification code is sent to that address. The response always indicates that an email code step is next, regardless of whether the email exists, to prevent email enumeration attacks. Returns: - NextAuthFlowResponse with email_code set and a new auth_flow_token Errors: - RESOURCE_EXHAUSTED: Too many login attempts from this origin - UNAUTHENTICATED: Missing origin header - INTERNAL: Server error (e.g., database or email sending failure)
-
emailCode
public void emailCode(EmailCodeRequest request, io.grpc.stub.StreamObserver<NextAuthFlowResponse> responseObserver) Description copied from interface:LoginServiceGrpc.AsyncServiceVerifies an email verification code to complete authentication. The auth_flow_token must match a pending login flow, and the code must match the one that was sent to the user's email. On success, returns a JWT token. On failure, returns a Failure response with INVALID_CODE reason. After successful verification, the auth_flow_token is invalidated and cannot be reused. Returns: - NextAuthFlowResponse with success set (containing JWT token) if code is valid - NextAuthFlowResponse with failure set (INVALID_CODE reason) if code is invalid Errors: - RESOURCE_EXHAUSTED: Too many login attempts from this origin - UNAUTHENTICATED: Missing origin header - INTERNAL: Server error (e.g., JWT generation failure)
-