public class MgmtAPIClient extends Object
| Constructor and Description |
|---|
MgmtAPIClient() |
| Modifier and Type | Method and Description |
|---|---|
AccessToken |
getAccessToken(String username,
String password)
To get the Access Token Management URL, client_id and client_secret needs
to be passed through a config file whose full path is passed as system
property like -DconfigFile.path="/to/dir/config.properties"
|
AccessToken |
getAccessToken(String username,
String password,
String mfa)
To get the Access Token Management URL, client_id and client_secret needs
to be passed through a config file whose full path is passed as system
property like -DconfigFile.path="/to/dir/config.properties"
|
AccessToken |
getAccessToken(String url,
String clientId,
String client_secret,
String username,
String password)
To get the Access Token
|
AccessToken |
getAccessToken(String url,
String clientId,
String client_secret,
String username,
String password,
String mfa)
To get Access Token
|
AccessToken |
getAccessTokenFromRefreshToken(String url,
String clientId,
String client_secret,
String refreshToken)
To get the Access Token from Refresh Token
|
org.springframework.core.env.Environment |
getConfigProperties()
Fetch the properties from the property file passed as system argument (-DconfigFile.path)
|
String |
getGoogleAccessToken(File serviceAccountJSON)
To get the Google Service Account Access Token
|
public AccessToken getAccessToken(String username, String password) throws Exception
username - password - Exceptionpublic AccessToken getAccessToken(String username, String password, String mfa) throws Exception
username - password - mfa - Exceptionpublic AccessToken getAccessToken(String url, String clientId, String client_secret, String username, String password, String mfa) throws Exception
url - clientId - client_secret - username - password - mfa - Exceptionpublic AccessToken getAccessToken(String url, String clientId, String client_secret, String username, String password) throws Exception
url - clientId - client_secret - username - password - Exceptionpublic AccessToken getAccessTokenFromRefreshToken(String url, String clientId, String client_secret, String refreshToken) throws Exception
url - clientId - client_secret - username - password - Exceptionpublic org.springframework.core.env.Environment getConfigProperties()
Copyright © 2022. All rights reserved.