public abstract class AuthenticationService extends Service
| Constructor and Description |
|---|
AuthenticationService(URI defaultURI) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAccessToken()
Gets the access token of the service.
|
List<GameProfile> |
getAvailableProfiles()
Gets the available profiles of the user logged in with the service.
|
String |
getPassword()
Gets the password of the service.
|
List<GameProfile.Property> |
getProperties()
Gets the properties of the user logged in with the service.
|
GameProfile |
getSelectedProfile()
Gets the selected profile of the user logged in with the service.
|
String |
getUsername()
Gets the username of the service.
|
boolean |
isLoggedIn()
Gets whether the service has been used to log in.
|
abstract void |
login()
Logs the service in.
|
void |
logout()
Logs the service out.
|
void |
setAccessToken(String accessToken)
Sets the access token of the service.
|
void |
setPassword(String password)
Sets the password of the service.
|
void |
setUsername(String username)
Sets the username of the service.
|
getBaseUri, getEndpointUri, getEndpointUri, getProxy, setBaseUri, setBaseUri, setProxypublic AuthenticationService(URI defaultURI)
public String getAccessToken()
public boolean isLoggedIn()
public String getUsername()
public String getPassword()
public void setUsername(String username)
username - Username to set.public void setPassword(String password)
password - Password to set.public List<GameProfile.Property> getProperties()
public List<GameProfile> getAvailableProfiles()
public GameProfile getSelectedProfile()
public void setAccessToken(String accessToken)
accessToken - Access token to set.public abstract void login()
throws RequestException
RequestException - If an error occurs while making the request.public void logout()
throws RequestException
RequestException - If an error occurs while making the request.Copyright © 2023. All rights reserved.