public class Client extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
accessToken
OAuth 2.0 Access Token
|
static String |
CUSTOM_USER_AGENT |
protected String |
error
Last error found
|
protected String |
errorAttribute
The attribute that caused the last error found if declared
|
protected String |
errorDescription
Description of last error found
|
protected org.joda.time.DateTime |
expiration
OAuth 2.0 Token expiration
|
int |
maxResults
Limit the number of elements returned in a search
|
protected String |
refreshToken
OAuth 2.0 Refresh Token
|
protected Settings |
settings
Settings object
|
String |
userAgent
The User-Agent to be used on requests
|
static String |
VERSION |
| Constructor and Description |
|---|
Client() |
Client(boolean throwOAuthProblemException) |
Client(int maxResults) |
Client(int maxResults,
boolean throwOAuthProblemException)
Constructs the client to execute Onelogin's API calls.
|
Client(String clientID,
String clientSecret,
String region) |
Client(String clientID,
String clientSecret,
String region,
boolean throwOAuthProblemException) |
| Modifier and Type | Method and Description |
|---|---|
FactorEnrollmentResponse |
activateFactor(long userId,
long deviceId)
Triggers an SMS or Push notification containing a One-Time Password (OTP)
that can be used to authenticate a user with the Verify Factor call.
|
Boolean |
assignRoleToUser(long id,
List<Long> roleIds)
Assigns Role to User
|
void |
cleanError()
Clean error message
|
void |
createEvent(Map<String,Object> eventParams)
Create an event in the OneLogin event log.
|
Object |
createSessionLoginToken(Map<String,Object> queryParams)
Generate a session login token in scenarios in which MFA may or may not be required.
|
Object |
createSessionLoginToken(Map<String,Object> queryParams,
String allowedOrigin)
Generates a session login token in scenarios in which MFA may or may not be required.
|
User |
createUser(Map<String,Object> userParams)
Creates an user
|
Boolean |
deleteUser(long id)
Deletes an user
|
OTPDevice |
enrollFactor(long userId,
long factorId,
String displayName,
String number)
Enroll a user with a given authentication factor.
|
String |
generateInviteLink(String email)
Generates an invite link for a user that you have already created in your OneLogin account.
|
void |
getAccessToken()
Generates an access token and refresh token that you may use to call Onelogin's API methods.
|
protected String |
getAuthorization() |
protected String |
getAuthorization(Boolean bearer) |
protected Map<String,String> |
getAuthorizedHeader() |
protected Map<String,String> |
getAuthorizedHeader(Boolean bearer) |
List<String> |
getCustomAttributes()
Gets a list of all custom attribute fields (also known as custom user fields) that have been defined for OL account.
|
List<EmbedApp> |
getEmbedApps(String token,
String email)
Lists apps accessible by a OneLogin user.
|
List<OTPDevice> |
getEnrolledFactors(long userId)
Return a list of authentication factors registered to a particular user
for multifactor authentication (MFA)
|
String |
getError() |
String |
getErrorAttribute() |
String |
getErrorDescription() |
Event |
getEvent(long id)
Gets Event by ID.
|
List<Event> |
getEvents()
Gets a list of Event resources. (50 elements)
|
List<Event> |
getEvents(HashMap<String,String> queryParameters)
Gets a list of Event resources.
|
List<Event> |
getEvents(HashMap<String,String> queryParameters,
int maxResults)
Gets a list of Event resources.
|
List<Event> |
getEvents(int maxResults)
Gets a list of Event resources.
|
OneLoginResponse<Event> |
getEventsBatch(HashMap<String,String> queryParameters,
int batchSize,
String afterCursor)
Get a batch of Events.
|
OneLoginResponse<Event> |
getEventsBatch(int batchSize)
Get a batch of Events.
|
OneLoginResponse<Event> |
getEventsBatch(int batchSize,
String afterCursor)
Get a batch of Events.
|
List<EventType> |
getEventTypes()
List of all OneLogin event types available to the Events API.
|
List<AuthFactor> |
getFactors(long userId)
Returns a list of authentication factors that are available for user enrollment
via API.
|
Group |
getGroup(long id)
Gets Group by ID.
|
List<Group> |
getGroups()
Gets a list of Group resources.
|
List<Group> |
getGroups(int maxResults)
Gets a list of Group resources (element of groups limited with the limit parameter).
|
OneLoginResponse<Group> |
getGroupsBatch(HashMap<String,String> queryParameters,
int batchSize,
String afterCursor)
Get a batch of Groups
|
OneLoginResponse<Group> |
getGroupsBatch(int batchSize)
Get a batch of Groups.
|
OneLoginResponse<Group> |
getGroupsBatch(int batchSize,
String afterCursor)
Get a batch of Groups.
|
String |
getIP() |
RateLimit |
getRateLimit()
Gets current rate limit details about an access token.
|
Role |
getRole(long id)
Gets Role by ID.
|
List<Role> |
getRoles()
Gets a list of Role resources
|
List<Role> |
getRoles(HashMap<String,String> queryParameters)
Gets a list of Role resources.
|
List<Role> |
getRoles(HashMap<String,String> queryParameters,
int maxResults)
Gets a list of Role resources.
|
List<Role> |
getRoles(int maxResults)
Gets a list of Role resources.
|
OneLoginResponse<Role> |
getRolesBatch(HashMap<String,String> queryParameters,
int batchSize,
String afterCursor)
Get a batch of Roles.
|
OneLoginResponse<Role> |
getRolesBatch(int batchSize)
Get a batch of Roles.
|
OneLoginResponse<Role> |
getRolesBatch(int batchSize,
String afterCursor)
Get a batch of Roles.
|
SAMLEndpointResponse |
getSAMLAssertion(String usernameOrEmail,
String password,
String appId,
String subdomain)
Generates a SAML Assertion.
|
SAMLEndpointResponse |
getSAMLAssertion(String usernameOrEmail,
String password,
String appId,
String subdomain,
String ipAddress)
Generates a SAML Assertion.
|
SAMLEndpointResponse |
getSAMLAssertionVerifying(String appId,
String devideId,
String stateToken)
Verifies a one-time password (OTP) value provided for a second factor when multi-factor authentication (MFA) is required for SAML authentication.
|
SAMLEndpointResponse |
getSAMLAssertionVerifying(String appId,
String devideId,
String stateToken,
String otpToken)
Verifies a one-time password (OTP) value provided for a second factor when multi-factor authentication (MFA) is required for SAML authentication.
|
SAMLEndpointResponse |
getSAMLAssertionVerifying(String appId,
String devideId,
String stateToken,
String otpToken,
String urlEndpoint)
Verifies a one-time password (OTP) value provided for a second factor when multi-factor authentication (MFA) is required for SAML authentication.
|
SAMLEndpointResponse |
getSAMLAssertionVerifying(String appId,
String devideId,
String stateToken,
String otpToken,
String urlEndpoint,
Boolean doNotNotify)
Verifies a one-time password (OTP) value provided for a second factor when multi-factor authentication (MFA) is required for SAML authentication.
|
SessionTokenInfo |
getSessionTokenVerified(String devideId,
String stateToken)
Verify a one-time password (OTP) value provided for multi-factor authentication (MFA).
|
SessionTokenInfo |
getSessionTokenVerified(String devideId,
String stateToken,
String otpToken)
Verify a one-time password (OTP) value provided for multi-factor authentication (MFA).
|
SessionTokenInfo |
getSessionTokenVerified(String devideId,
String stateToken,
String otpToken,
String allowedOrigin)
Verify a one-time password (OTP) value provided for multi-factor authentication (MFA).
|
SessionTokenInfo |
getSessionTokenVerified(String devideId,
String stateToken,
String otpToken,
String allowedOrigin,
Boolean doNotNotify)
Verify a one-time password (OTP) value provided for multi-factor authentication (MFA).
|
User |
getUser(long id)
Gets User by ID.
|
List<App> |
getUserApps(long id)
Gets a list of apps accessible by a user, not including personal apps.
|
List<Integer> |
getUserRoles(long id)
Gets a list of role IDs that have been assigned to a user.
|
List<User> |
getUsers()
Gets a list of User resources
|
List<User> |
getUsers(HashMap<String,String> queryParameters)
Gets a list of User resources.
|
List<User> |
getUsers(HashMap<String,String> queryParameters,
int maxResults)
Gets a list of User resources.
|
List<User> |
getUsers(int maxResults)
Gets a list of User resources.
|
OneLoginResponse<User> |
getUsersBatch(HashMap<String,String> queryParameters,
int batchSize,
String afterCursor)
Get a batch of Users.
|
OneLoginResponse<User> |
getUsersBatch(int batchSize)
Get a batch Users.
|
OneLoginResponse<User> |
getUsersBatch(int batchSize,
String afterCursor)
Get a batch of Users.
|
boolean |
isExpired() |
Boolean |
lockUser(long id,
int minutes)
Use this call to lock a user’s account based on the policy assigned to the user,
for a specific time you define in the request, or until you unlock it.
|
Boolean |
logUserOut(long id)
Log a user out of any and all sessions.
|
void |
prepareToken()
Prepare the client before execute a call to the API (get token ready)
|
void |
refreshToken()
Refreshing tokens provides a new set of access and refresh tokens.
|
Boolean |
removeFactor(long userId,
long deviceId)
Remove an enrolled factor from a user.
|
Boolean |
removeRoleFromUser(long id,
List<Long> roleIds)
Remove Role from User
|
void |
revokeToken()
Revokes an access token and refresh token pair.
|
Boolean |
sendInviteLink(String email)
Send an invite link to a user that you have already created in your OneLogin account.
|
Boolean |
sendInviteLink(String email,
String personalEmail)
Sends an invite link to a user that you have already created in your OneLogin account.
|
Boolean |
setCustomAttributeToUser(long id,
Map<String,Object> customAttributes)
Set Custom Attribute Value
|
Boolean |
setPasswordUsingClearText(long id,
String password,
String passwordConfirmation)
Sets Password by ID Using Cleartext
|
Boolean |
setPasswordUsingHashSalt(long id,
String password,
String passwordConfirmation,
String passwordAlgorithm)
Set Password by ID Using Salt and SHA-256
|
Boolean |
setPasswordUsingHashSalt(long id,
String password,
String passwordConfirmation,
String passwordAlgorithm,
String passwordSalt)
Set Password by ID Using Salt and SHA-256
|
Boolean |
setStateToUser(long id,
int state)
Set User State
|
User |
updateUser(long id,
Map<String,Object> userParams)
Updates an user
|
Boolean |
verifyFactor(long userId,
long deviceId)
Authenticates a one-time password (OTP) code provided by a multifactor authentication (MFA) device.
|
Boolean |
verifyFactor(long userId,
long deviceId,
String otpToken)
Authenticates a one-time password (OTP) code provided by a multifactor authentication (MFA) device.
|
Boolean |
verifyFactor(long userId,
long deviceId,
String otpToken,
String stateToken)
Authenticates a one-time password (OTP) code provided by a multifactor authentication (MFA) device.
|
public static final String VERSION
public static final String CUSTOM_USER_AGENT
protected String accessToken
protected String refreshToken
protected org.joda.time.DateTime expiration
protected String error
protected String errorDescription
protected String errorAttribute
protected Settings settings
public String userAgent
public int maxResults
public Client(int maxResults,
boolean throwOAuthProblemException)
throws IOException,
Error
maxResults - Set max number of items returned by a collectionIOException - - If Settings initialization raises that exception when calling loadPropFile to load the fileError - - If Settings initialization raises that exception when calling loadPropFile to load the filepublic Client(int maxResults)
throws IOException,
Error
IOExceptionErrorpublic Client()
throws IOException,
Error
IOExceptionErrorpublic Client(boolean throwOAuthProblemException)
throws IOException,
Error
IOExceptionErrorpublic void getAccessToken()
throws org.apache.oltu.oauth2.common.exception.OAuthSystemException,
org.apache.oltu.oauth2.common.exception.OAuthProblemException
org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONAccessTokenResponse and throwOAuthProblemException is enabledpublic void refreshToken()
throws org.apache.oltu.oauth2.common.exception.OAuthSystemException,
org.apache.oltu.oauth2.common.exception.OAuthProblemException
org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONAccessTokenResponse and throwOAuthProblemException is enabledpublic void revokeToken()
throws org.apache.oltu.oauth2.common.exception.OAuthSystemException,
org.apache.oltu.oauth2.common.exception.OAuthProblemException
org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONAccessTokenResponse and throwOAuthProblemException is enabledpublic RateLimit getRateLimit() throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException
org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledRateLimit,
Get Rate Limit documentationpublic List<User> getUsers(HashMap<String,String> queryParameters, int maxResults) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParameters - Query parameters of the Resource
Parameters to filter the result of the listmaxResults - Limit the number of users returned (optional)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the getResource callUser,
Get Users documentationpublic OneLoginResponse<User> getUsersBatch(int batchSize) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
batchSize - Size of the Batchorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the getResource callUser,
Get Users documentationpublic OneLoginResponse<User> getUsersBatch(int batchSize, String afterCursor) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
batchSize - Size of the BatchafterCursor - Reference to continue collecting items of next pageorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the getResource callUser,
Get Users documentationpublic OneLoginResponse<User> getUsersBatch(HashMap<String,String> queryParameters, int batchSize, String afterCursor) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParameters - Query parameters of the ResourcebatchSize - Size of the BatchafterCursor - Reference to continue collecting items of next pageorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the getResource callUser,
Get Users documentationpublic List<User> getUsers(HashMap<String,String> queryParameters) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParameters - Query parameters of the Resource
Parameters to filter the result of the listorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the getResource callUser,
Get Users documentationpublic List<User> getUsers(int maxResults) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
maxResults - Limit the number of users returned (optional)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the getResource callUser,
Get Users documentationpublic List<User> getUsers() throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the getResource callUser,
Get Users documentationpublic User getUser(long id) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the userorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorUser,
Get User by ID documentationpublic List<App> getUserApps(long id) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the userorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorApp,
Get Apps for a User documentationpublic List<Integer> getUserRoles(long id) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the userorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorRole,
Get Roles for a User documentationpublic List<String> getCustomAttributes() throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic User createUser(Map<String,Object> userParams) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
userParams - User data (firstname, lastname, email, username, company, department, directory_id, distinguished_name,
external_id, group_id, invalid_login_attempts, locale_code, manager_ad_id, member_of, notes, openid_name,
phone, samaccountname, title, userprincipalname)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Object createSessionLoginToken(Map<String,Object> queryParams, String allowedOrigin) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParams - Query Parameters (username_or_email, password, subdomain, return_to_url, ip_address, browser_id)allowedOrigin - Custom-Allowed-Origin-Header. Required for CORS requests only. Set to the Origin URI from which you are allowed to send a request using CORS.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Object createSessionLoginToken(Map<String,Object> queryParams) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParams - Query Parameters (username_or_email, password, subdomain, return_to_url, ip_address, browser_id)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic SessionTokenInfo getSessionTokenVerified(String devideId, String stateToken, String otpToken, String allowedOrigin, Boolean doNotNotify) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
devideId - Provide the MFA device_id you are submitting for verification.stateToken - Provide the state_token associated with the MFA device_id you are submitting for verification.otpToken - Provide the OTP value for the MFA factor you are submitting for verification.allowedOrigin - Custom-Allowed-Origin-Header. Required for CORS requests only. Set to the Origin URI from which you are allowed to send a request using CORS.doNotNotify - When verifying MFA via Protect Push, set this to true toorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic SessionTokenInfo getSessionTokenVerified(String devideId, String stateToken, String otpToken, String allowedOrigin) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
devideId - Provide the MFA device_id you are submitting for verification.stateToken - Provide the state_token associated with the MFA device_id you are submitting for verification.otpToken - Provide the OTP value for the MFA factor you are submitting for verification.allowedOrigin - Custom-Allowed-Origin-Header. Required for CORS requests only. Set to the Origin URI from which you are allowed to send a request using CORS.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic SessionTokenInfo getSessionTokenVerified(String devideId, String stateToken, String otpToken) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
devideId - Provide the MFA device_id you are submitting for verification.stateToken - Provide the state_token associated with the MFA device_id you are submitting for verification.otpToken - Provide the OTP value for the MFA factor you are submitting for verification.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic SessionTokenInfo getSessionTokenVerified(String devideId, String stateToken) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
devideId - Provide the MFA device_id you are submitting for verification.stateToken - Provide the state_token associated with the MFA device_id you are submitting for verification.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic User updateUser(long id, Map<String,Object> userParams) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the user to be modifieduserParams - User data (firstname, lastname, email, username, company, department, directory_id, distinguished_name,
external_id, group_id, invalid_login_attempts, locale_code, manager_ad_id, member_of, notes, openid_name,
phone, samaccountname, title, userprincipalname)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean assignRoleToUser(long id, List<Long> roleIds) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the user to be modifiedroleIds - Set to an array of one or more role IDs.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean removeRoleFromUser(long id, List<Long> roleIds) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the user to be modifiedroleIds - Set to an array of one or more role IDs.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean setPasswordUsingClearText(long id, String password, String passwordConfirmation) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the user to be modifiedpassword - Set to the password value using cleartext.passwordConfirmation - Ensure that this value matches the password value exactly.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean setPasswordUsingHashSalt(long id, String password, String passwordConfirmation, String passwordAlgorithm, String passwordSalt) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the user to be modifiedpassword - Set to the password value using a SHA-256-encoded value.passwordConfirmation - This value must match the password value.passwordAlgorithm - Set to salt+sha256.passwordSalt - To provide your own salt value.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean setPasswordUsingHashSalt(long id, String password, String passwordConfirmation, String passwordAlgorithm) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the user to be modifiedpassword - Set to the password value using a SHA-256-encoded value.passwordConfirmation - This value must match the password value.passwordAlgorithm - Set to salt+sha256.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean setStateToUser(long id, int state) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the user to be modifiedstate - Set to the state value. [Unapproved: 0, Approved (licensed): 1, Rejected: 2, Unlicensed: 3]org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean setCustomAttributeToUser(long id, Map<String,Object> customAttributes) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the user to be modifiedcustomAttributes - Provide one or more key value pairs composed of the custom attribute field shortname and the value that you want to set the field to.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean logUserOut(long id) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the user to be modifiedorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean lockUser(long id, int minutes) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the user to be modifiedminutes - Set to the number of minutes for which you want to lock the user account. (0 to delegate on policy)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean deleteUser(long id) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the user to be deletedorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic List<Role> getRoles(HashMap<String,String> queryParameters, int maxResults) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParameters - Query parameters of the Resource
Parameters to filter the result of the listmaxResults - Limit the number of roles returned (optional)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at getResource callRole,
Get Roles documentationpublic OneLoginResponse<Role> getRolesBatch(int batchSize) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
batchSize - Size of the Batchorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorRole,
Get Roles documentationpublic OneLoginResponse<Role> getRolesBatch(int batchSize, String afterCursor) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
batchSize - Size of the BatchafterCursor - Reference to continue collecting items of next pageorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorRole,
Get Roles documentationpublic OneLoginResponse<Role> getRolesBatch(HashMap<String,String> queryParameters, int batchSize, String afterCursor) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParameters - Query parameters of the ResourcebatchSize - Size of the BatchafterCursor - Reference to continue collecting items of next pageorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorRole,
Get Roles documentationpublic List<Role> getRoles(HashMap<String,String> queryParameters) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParameters - Query parameters of the Resource
Parameters to filter the result of the listorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorRole,
Get Roles documentationpublic List<Role> getRoles(int maxResults) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
maxResults - Limit the number of roles returned (optional)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorRole,
Get Roles documentationpublic List<Role> getRoles() throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorRole,
Get Roles documentationpublic Role getRole(long id) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the roleorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorRole,
Get Role by ID documentationpublic List<EventType> getEventTypes() throws URISyntaxException, org.apache.http.client.ClientProtocolException, IOException
URISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorIOException - - if CloseableHttpClient raises the exceptionorg.apache.http.client.ClientProtocolException - - if CloseableHttpClient raises the exceptionEventType,
Get Event Types documentationpublic List<Event> getEvents(HashMap<String,String> queryParameters, int maxResults) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParameters - Query parameters of the Resource
Parameters to filter the result of the listmaxResults - Limit the number of events returned (optional)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorEvent,
Get Events documentationpublic OneLoginResponse<Event> getEventsBatch(int batchSize) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
batchSize - Size of the Batchorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorEvent,
Get Events documentationpublic OneLoginResponse<Event> getEventsBatch(int batchSize, String afterCursor) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
batchSize - Size of the BatchafterCursor - Reference to continue collecting items of next pageorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorEvent,
Get Events documentationpublic OneLoginResponse<Event> getEventsBatch(HashMap<String,String> queryParameters, int batchSize, String afterCursor) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParameters - Query parameters of the ResourcebatchSize - Size of the BatchafterCursor - Reference to continue collecting items of next pageorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorEvent,
Get Events documentationpublic List<Event> getEvents(HashMap<String,String> queryParameters) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParameters - Query parameters of the Resource
Parameters to filter the result of the listorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorEvent,
Get Events documentationpublic List<Event> getEvents(int maxResults) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
maxResults - Limit the number of events returned (optional)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorEvent,
Get Events documentationpublic List<Event> getEvents() throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorEvent,
Get Events documentationpublic Event getEvent(long id) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the eventorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorEvent,
Get Event by ID documentationpublic void createEvent(Map<String,Object> eventParams) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
eventParams - Event Data (event_type_id, account_id, actor_system, actor_user_id, actor_user_name, app_id,
assuming_acting_user_id, custom_message, directory_sync_run_id, group_id, group_name, ipaddr,
otp_device_id, otp_device_name, policy_id, policy_name, role_id, role_name, user_id, user_name)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorEvent,
Create Event documentationpublic List<Group> getGroups(int maxResults) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
maxResults - Limit the number of groups returned (optional)org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the getResource callGroup,
Get Groups documentationpublic List<Group> getGroups() throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorGroup,
Get Groups documentationpublic OneLoginResponse<Group> getGroupsBatch(int batchSize) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
batchSize - Size of the Batchorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorGroup,
Get Groups documentationpublic OneLoginResponse<Group> getGroupsBatch(int batchSize, String afterCursor) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
batchSize - Size of the BatchafterCursor - Reference to continue collecting items of next pageorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorGroup,
Get Groups documentationpublic OneLoginResponse<Group> getGroupsBatch(HashMap<String,String> queryParameters, int batchSize, String afterCursor) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
queryParameters - Query parameters of the ResourcebatchSize - Size of the BatchafterCursor - Reference to continue collecting items of next pageorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorGroup,
Get Groups documentationpublic Group getGroup(long id) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
id - Id of the grouporg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorGroup,
Get Group by ID documentationpublic SAMLEndpointResponse getSAMLAssertion(String usernameOrEmail, String password, String appId, String subdomain, String ipAddress) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
usernameOrEmail - username or email of the OneLogin user accessing the apppassword - Password of the OneLogin user accessing the appappId - App ID of the app for which you want to generate a SAML tokensubdomain - subdomain of the OneLogin account related to the user/appipAddress - whitelisted IP address that needs to be bypassed (some MFA scenarios).org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorSAMLEndpointResponse,
Generate SAML Assertion documentationpublic SAMLEndpointResponse getSAMLAssertion(String usernameOrEmail, String password, String appId, String subdomain) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
usernameOrEmail - username or email of the OneLogin user accessing the apppassword - Password of the OneLogin user accessing the appappId - App ID of the app for which you want to generate a SAML tokensubdomain - subdomain of the OneLogin user accessing the apporg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorSAMLEndpointResponse,
Generate SAML Assertion documentationpublic SAMLEndpointResponse getSAMLAssertionVerifying(String appId, String devideId, String stateToken, String otpToken, String urlEndpoint, Boolean doNotNotify) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
appId - App ID of the app for which you want to generate a SAML tokendevideId - Provide the MFA device_id you are submitting for verification.stateToken - Provide the state_token associated with the MFA device_id you are submitting for verification.otpToken - Provide the OTP value for the MFA factor you are submitting for verification.urlEndpoint - Specify an url where return the response.doNotNotify - When verifying MFA via Protect Push, set this to true to stop additional push notifications being sent to the OneLogin Protect deviceorg.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorSAMLEndpointResponse,
Verify Factor documentationpublic SAMLEndpointResponse getSAMLAssertionVerifying(String appId, String devideId, String stateToken, String otpToken, String urlEndpoint) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
appId - App ID of the app for which you want to generate a SAML tokendevideId - Provide the MFA device_id you are submitting for verification.stateToken - Provide the state_token associated with the MFA device_id you are submitting for verification.otpToken - Provide the OTP value for the MFA factor you are submitting for verification.urlEndpoint - Specify an url where return the response.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorSAMLEndpointResponse,
Verify Factor documentationpublic SAMLEndpointResponse getSAMLAssertionVerifying(String appId, String devideId, String stateToken, String otpToken) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
appId - App ID of the app for which you want to generate a SAML tokendevideId - Provide the MFA device_id you are submitting for verification.stateToken - Provide the state_token associated with the MFA device_id you are submitting for verification.otpToken - Provide the OTP value for the MFA factor you are submitting for verification.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorSAMLEndpointResponse,
Verify Factor documentationpublic SAMLEndpointResponse getSAMLAssertionVerifying(String appId, String devideId, String stateToken) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
appId - App ID of the app for which you want to generate a SAML tokendevideId - Provide the MFA device_id you are submitting for verification.stateToken - Provide the state_token associated with the MFA device_id you are submitting for verification.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorSAMLEndpointResponse,
Verify Factor documentationpublic List<AuthFactor> getFactors(long userId) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
userId - The id of the user.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic OTPDevice enrollFactor(long userId, long factorId, String displayName, String number) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
userId - The id of the user.factorId - The identifier of the factor to enroll the user with.displayName - A name for the users device.number - The phone number of the user in E.164 format.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic List<OTPDevice> getEnrolledFactors(long userId) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
userId - The id of the user.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic FactorEnrollmentResponse activateFactor(long userId, long deviceId) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
userId - The id of the user.deviceId - the id of the MFA device.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean verifyFactor(long userId, long deviceId, String otpToken, String stateToken) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
userId - The id of the user.deviceId - The id of the MFA device.otpToken - OTP code provided by the device or SMS message sent to user.
When a device like OneLogin Protect that supports Push has
been used you do not need to provide the otp_token.stateToken - The state_token is returned after a successful request
to Enroll a Factor or Activate a Factor.
MUST be provided if the needs_trigger attribute from
the proceeding calls is set to true.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean verifyFactor(long userId, long deviceId, String otpToken) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
userId - The id of the user.deviceId - The id of the MFA device.otpToken - OTP code provided by the device or SMS message sent to user.
When a device like OneLogin Protect that supports Push has
been used you do not need to provide the otp_token.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean verifyFactor(long userId, long deviceId) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
userId - The id of the user.deviceId - The id of the MFA device.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean removeFactor(long userId, long deviceId) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
userId - The id of the user.deviceId - The device_id of the MFA device.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic String generateInviteLink(String email) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
email - Set to the email address of the user that you want to generate an invite link for.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean sendInviteLink(String email, String personalEmail) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
email - Set to the email address of the user that you want to send an invite link for.personalEmail - If you want to send the invite email to an email other than the one provided in email,
provide it here. The invite link will be sent to this address instead.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic Boolean sendInviteLink(String email) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException, org.apache.oltu.oauth2.common.exception.OAuthProblemException, URISyntaxException
email - Set to the email address of the user that you want to send an invite link for.org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabledURISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorpublic List<EmbedApp> getEmbedApps(String token, String email) throws URISyntaxException, org.apache.http.client.ClientProtocolException, IOException, ParserConfigurationException, SAXException, XPathExpressionException
token - Provide your embedding token.email - Provide the email of the user for which you want to return a list of apps to be embed.URISyntaxException - - if there is an error when generating the target URL at the URIBuilder constructorIOException - - if DocumentBuilder, CloseableHttpClient or EntityUtils raises the exceptionorg.apache.http.client.ClientProtocolException - - if CloseableHttpClient raises the exceptionParserConfigurationException - - if a DocumentBuilder cannot be created which satisfies the configuration requested.SAXException - - If any parse errors occur when calling parse method of DocumentBuilderXPathExpressionException - - If XPathExpression cannot be evaluated.App,
Get Apps to Embed for a User documentationpublic void prepareToken()
throws org.apache.oltu.oauth2.common.exception.OAuthSystemException,
org.apache.oltu.oauth2.common.exception.OAuthProblemException
org.apache.oltu.oauth2.common.exception.OAuthSystemException - - if there is a IOException reading parameters of the httpURLConnectionorg.apache.oltu.oauth2.common.exception.OAuthProblemException - - if there are errors validating the OneloginOAuthJSONAccessTokenResponse and throwOAuthProblemException is enabledpublic boolean isExpired()
public String getError()
public String getErrorDescription()
public String getErrorAttribute()
public void cleanError()
protected String getAuthorization()
public String getIP()
Copyright © 2018. All rights reserved.