public class MsaAuthenticationService extends AuthenticationService
| Modifier and Type | Class and Description |
|---|---|
static class |
MsaAuthenticationService.MsCodeResponse |
static class |
MsaAuthenticationService.MsTokenResponse |
| Constructor and Description |
|---|
MsaAuthenticationService(String clientId) |
MsaAuthenticationService(String clientId,
String deviceCode) |
| Modifier and Type | Method and Description |
|---|---|
MsaAuthenticationService.MsCodeResponse |
getAuthCode()
Generate a single use code for Microsoft authentication
|
MsaAuthenticationService.MsCodeResponse |
getAuthCode(boolean offlineAccess)
Generate a single use code for Microsoft authentication
|
String |
getRefreshToken()
Gets the current refresh token for this session
|
void |
login()
Logs the service in.
|
void |
logout()
Logs the service out.
|
MsaAuthenticationService.MsTokenResponse |
refreshToken()
Refreshes the access token and refresh token for further use
|
void |
setRefreshToken(String refreshToken)
Sets a new refresh token.
|
String |
toString() |
getAccessToken, getAvailableProfiles, getPassword, getProperties, getSelectedProfile, getUsername, isLoggedIn, setAccessToken, setPassword, setUsernamegetBaseUri, getEndpointUri, getEndpointUri, getProxy, setBaseUri, setBaseUri, setProxypublic MsaAuthenticationService(String clientId)
public String getRefreshToken()
public void setRefreshToken(String refreshToken)
refreshToken - The refresh token to setpublic MsaAuthenticationService.MsCodeResponse getAuthCode() throws RequestException
RequestExceptionpublic MsaAuthenticationService.MsCodeResponse getAuthCode(boolean offlineAccess) throws RequestException
offlineAccess - whether a refresh token should be generated for later use.RequestExceptionpublic MsaAuthenticationService.MsTokenResponse refreshToken() throws RequestException
RequestExceptionpublic void login()
throws RequestException
AuthenticationServicelogin in class AuthenticationServiceRequestException - If an error occurs while making the request.public void logout()
throws RequestException
AuthenticationServicelogout in class AuthenticationServiceRequestException - If an error occurs while making the request.Copyright © 2023. All rights reserved.