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) |
MinecraftAuth.InitialXblSessionBuilder |
deviceCode()
Uses the device code flow to get an MSA token.
|
MinecraftAuth.InitialXblSessionBuilder |
externalBrowser()
Generates a URL to open in the browser to get an MSA token.
|
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 |
withRedirectUri(java.lang.String redirectUri)
Sets the redirect uri to use for the external browser 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 external browser 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 withTimeout(int timeout)
timeout - The timeout in secondspublic MinecraftAuth.MsaTokenBuilder withRedirectUri(java.lang.String redirectUri)
redirectUri - The redirect uripublic MinecraftAuth.InitialXblSessionBuilder deviceCode()
StepMsaDeviceCode.MsaDeviceCodeCallback as input when calling AbstractStep.getFromInput(HttpClient, Object).public MinecraftAuth.InitialXblSessionBuilder externalBrowser()
StepExternalBrowser.ExternalBrowserCallback as input when calling AbstractStep.getFromInput(HttpClient, Object).public MinecraftAuth.InitialXblSessionBuilder credentials()
StepCredentialsMsaCode.MsaCredentials as input when calling AbstractStep.getFromInput(HttpClient, Object).public MinecraftAuth.InitialXblSessionBuilder customMsaCodeStep(AbstractStep<?,MsaCodeStep.MsaCode> msaCodeStep)
public AbstractStep<MsaCodeStep.MsaCode,StepMsaToken.MsaToken> build()