public static class MinecraftAuth.MsaTokenBuilder
extends java.lang.Object
| Constructor and Description |
|---|
MsaTokenBuilder() |
| Modifier and Type | Method and Description |
|---|---|
AbstractStep<MsaCodeStep.MsaCode,StepMsaToken.MsaToken> |
build() |
MinecraftAuth.InitialXblSessionBuilder |
credentials()
Logs in with a Microsoft account's credentials and gets an MSA token.
|
MinecraftAuth.InitialXblSessionBuilder |
customMsaCodeStep(AbstractStep<?,MsaCodeStep.MsaCode> msaCodeStep)
Deprecated.
|
MinecraftAuth.InitialXblSessionBuilder |
customMsaCodeStep(java.util.function.Function<AbstractStep.ApplicationDetails,AbstractStep<?,MsaCodeStep.MsaCode>> msaCodeStepProvider)
Uses the specified custom MSA code step to get an MSA token.
|
MinecraftAuth.InitialXblSessionBuilder |
deviceCode()
Uses the device code flow to get an MSA token.
|
MinecraftAuth.InitialXblSessionBuilder |
javaFxWebView()
Opens a JavaFX WebView window to get an MSA token.
|
MinecraftAuth.InitialXblSessionBuilder |
localWebServer()
Generates a URL to open in the browser to get an MSA token.
|
MinecraftAuth.MsaTokenBuilder |
withApplicationDetails(AbstractStep.ApplicationDetails applicationDetails)
Sets the application details
|
MinecraftAuth.MsaTokenBuilder |
withClientId(java.lang.String clientId)
Sets the client id of the application
|
MinecraftAuth.MsaTokenBuilder |
withClientSecret(java.lang.String clientSecret)
Sets the client secret of the application
|
MinecraftAuth.MsaTokenBuilder |
withOAuthEnvironment(OAuthEnvironment oAuthEnvironment)
Sets the OAuth environment of the application
|
MinecraftAuth.MsaTokenBuilder |
withRedirectUri(java.lang.String redirectUri)
Sets the redirect uri to use for the local webserver or credentials auth flow
|
MinecraftAuth.MsaTokenBuilder |
withScope(java.lang.String scope)
Sets the scope of the application
|
MinecraftAuth.MsaTokenBuilder |
withTimeout(int timeout)
Sets the timeout of the device code or local webserver auth flow
|
public MinecraftAuth.MsaTokenBuilder withClientId(java.lang.String clientId)
clientId - The client idpublic MinecraftAuth.MsaTokenBuilder withScope(java.lang.String scope)
scope - The scopepublic MinecraftAuth.MsaTokenBuilder withClientSecret(java.lang.String clientSecret)
clientSecret - The client secretpublic MinecraftAuth.MsaTokenBuilder withRedirectUri(java.lang.String redirectUri)
redirectUri - The redirect uripublic MinecraftAuth.MsaTokenBuilder withOAuthEnvironment(OAuthEnvironment oAuthEnvironment)
oAuthEnvironment - The OAuth environmentpublic MinecraftAuth.MsaTokenBuilder withApplicationDetails(AbstractStep.ApplicationDetails applicationDetails)
applicationDetails - The application detailspublic MinecraftAuth.MsaTokenBuilder withTimeout(int timeout)
timeout - The timeout in secondspublic MinecraftAuth.InitialXblSessionBuilder deviceCode()
StepMsaDeviceCode.MsaDeviceCodeCallback as input when calling AbstractStep.getFromInput(HttpClient, AbstractStep.InitialInput).public MinecraftAuth.InitialXblSessionBuilder credentials()
StepCredentialsMsaCode.MsaCredentials as input when calling AbstractStep.getFromInput(HttpClient, AbstractStep.InitialInput).public MinecraftAuth.InitialXblSessionBuilder javaFxWebView()
StepJfxWebViewMsaCode.JavaFxWebView as input when calling AbstractStep.getFromInput(HttpClient, AbstractStep.InitialInput).public MinecraftAuth.InitialXblSessionBuilder localWebServer()
StepLocalWebServer.LocalWebServerCallback as input when calling AbstractStep.getFromInput(HttpClient, AbstractStep.InitialInput).public MinecraftAuth.InitialXblSessionBuilder customMsaCodeStep(java.util.function.Function<AbstractStep.ApplicationDetails,AbstractStep<?,MsaCodeStep.MsaCode>> msaCodeStepProvider)
msaCodeStepProvider - The custom MSA code step provider@Deprecated public MinecraftAuth.InitialXblSessionBuilder customMsaCodeStep(AbstractStep<?,MsaCodeStep.MsaCode> msaCodeStep)
public AbstractStep<MsaCodeStep.MsaCode,StepMsaToken.MsaToken> build()