Package com.glideapi.services
Class MagicAuthClient
java.lang.Object
com.glideapi.services.MagicAuthClient
MagicAuth client for carrier-based phone authentication
Aligned with Go and Node.js SDKs
-
Constructor Summary
ConstructorsConstructorDescriptionMagicAuthClient(Types.GlideSdkSettings settings) MagicAuthClient(Types.GlideSdkSettings settings, Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionGet the user's phone number Matches Go SDK: GetPhoneNumber(ctx, req) and Node SDK: getPhoneNumber(props)prepare(MagicAuthDtos.PrepareRequest request) Prepare authentication session Matches Go SDK: Prepare(ctx, req) and Node SDK: prepare(props)Verify a specific phone number Matches Go SDK: VerifyPhoneNumber(ctx, req) and Node SDK: verifyPhoneNumber(props)
-
Constructor Details
-
MagicAuthClient
-
MagicAuthClient
-
-
Method Details
-
prepare
Prepare authentication session Matches Go SDK: Prepare(ctx, req) and Node SDK: prepare(props)- Parameters:
request- The prepare request parameters- Returns:
- PrepareResponse for successful eligible requests
- Throws:
MagicAuthError- with code NOT_ELIGIBLE if user is not eligibleException- for other errors
-
verifyPhoneNumber
public MagicAuthDtos.VerifyPhoneNumberResponse verifyPhoneNumber(MagicAuthDtos.VerifyPhoneNumberRequest request) throws Exception Verify a specific phone number Matches Go SDK: VerifyPhoneNumber(ctx, req) and Node SDK: verifyPhoneNumber(props)- Parameters:
request- The verify phone number request- Returns:
- VerifyPhoneNumberResponse with verified status and phone number
- Throws:
Exception- if the request fails
-
getPhoneNumber
public MagicAuthDtos.GetPhoneNumberResponse getPhoneNumber(MagicAuthDtos.GetPhoneNumberRequest request) throws Exception Get the user's phone number Matches Go SDK: GetPhoneNumber(ctx, req) and Node SDK: getPhoneNumber(props)- Parameters:
request- The get phone number request- Returns:
- GetPhoneNumberResponse with the phone number
- Throws:
Exception- if the request fails
-