public class DataAdapterClient extends Object
| Constructor and Description |
|---|
DataAdapterClient(String serviceUrl)
Create a new client with provided base URL.
|
DataAdapterClient(String serviceUrl,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Create a new client with provided base URL and custom object mapper.
|
| Modifier and Type | Method and Description |
|---|---|
io.getlime.core.rest.model.base.response.ObjectResponse<UserAuthenticationResponse> |
authenticateUser(String userId,
String organizationId,
String password,
AuthenticationContext authenticationContext,
OperationContext operationContext)
Perform authentication with provided username and password.
|
io.getlime.core.rest.model.base.response.ObjectResponse<CreateSmsAuthorizationResponse> |
createAuthorizationSms(String userId,
String organizationId,
OperationContext operationContext,
String lang,
boolean resend)
Create authorization SMS message with OTP authorization code.
|
io.getlime.core.rest.model.base.response.ObjectResponse<CreateConsentFormResponse> |
createConsentForm(String userId,
String organizationId,
OperationContext operationContext,
String lang)
Create OAuth 2.0 consent form.
|
io.getlime.core.rest.model.base.response.ObjectResponse<DecorateOperationFormDataResponse> |
decorateOperationFormData(String userId,
String organizationId,
OperationContext operationContext)
Decorate operation form data.
|
io.getlime.core.rest.model.base.response.ObjectResponse<UserDetailResponse> |
fetchUserDetail(String userId,
String organizationId)
Obtain user details for given user ID.
|
io.getlime.core.rest.model.base.response.ObjectResponse |
formDataChangedNotification(FormDataChange formDataChange,
String userId,
String organizationId,
OperationContext operationContext)
Send a notification about form data change.
|
org.springframework.web.client.RestTemplate |
getRestTemplate()
Get default instance of REST client.
|
io.getlime.core.rest.model.base.response.ObjectResponse<InitConsentFormResponse> |
initConsentForm(String userId,
String organizationId,
OperationContext operationContext)
Initialize OAuth 2.0 consent form.
|
io.getlime.core.rest.model.base.response.ObjectResponse<UserDetailResponse> |
lookupUser(String username,
String organizationId,
OperationContext operationContext)
Lookup user account.
|
io.getlime.core.rest.model.base.response.ObjectResponse |
operationChangedNotification(OperationChange operationChange,
String userId,
String organizationId,
OperationContext operationContext)
Send a notification about operation change.
|
io.getlime.core.rest.model.base.response.ObjectResponse<SaveConsentFormResponse> |
saveConsentForm(String userId,
String organizationId,
OperationContext operationContext,
List<ConsentOption> options)
Save options selected by the user in the OAuth 2.0 consent form.
|
io.getlime.core.rest.model.base.response.ObjectResponse<ValidateConsentFormResponse> |
validateConsentForm(String userId,
String organizationId,
OperationContext operationContext,
String lang,
List<ConsentOption> options)
Validate options selected by the user in the OAuth 2.0 consent form.
|
io.getlime.core.rest.model.base.response.ObjectResponse<VerifySmsAuthorizationResponse> |
verifyAuthorizationSms(String messageId,
String authorizationCode,
String userId,
String organizationId,
OperationContext operationContext)
Verify OTP authorization code for previously generated SMS message.
|
io.getlime.core.rest.model.base.response.ObjectResponse<VerifySmsAndPasswordResponse> |
verifyAuthorizationSmsAndPassword(String messageId,
String authorizationCode,
String userId,
String organizationId,
String password,
AuthenticationContext authenticationContext,
OperationContext operationContext)
Verify OTP authorization code for previously generated SMS message together with user password.
|
public DataAdapterClient(String serviceUrl)
serviceUrl - Base URL.public DataAdapterClient(String serviceUrl, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
serviceUrl - Base URL.objectMapper - Object mapper.public org.springframework.web.client.RestTemplate getRestTemplate()
public io.getlime.core.rest.model.base.response.ObjectResponse<UserDetailResponse> lookupUser(String username, String organizationId, OperationContext operationContext) throws DataAdapterClientErrorException
username - Username for user account which is being looked up.organizationId - Organization ID for which the user ID is assigned to.operationContext - Operation context.DataAdapterClientErrorException - Thrown when client request fails or user does not exist.public io.getlime.core.rest.model.base.response.ObjectResponse<UserAuthenticationResponse> authenticateUser(String userId, String organizationId, String password, AuthenticationContext authenticationContext, OperationContext operationContext) throws DataAdapterClientErrorException
userId - User ID of user who is being authenticated.organizationId - Organization ID.password - Password for this authentication request, optionally encrypted.authenticationContext - Authentication context.operationContext - Operation context.DataAdapterClientErrorException - Thrown when client request fails or authentication fails.public io.getlime.core.rest.model.base.response.ObjectResponse<UserDetailResponse> fetchUserDetail(String userId, String organizationId) throws DataAdapterClientErrorException
userId - User ID for the user to be obtained.organizationId - Organization ID.DataAdapterClientErrorException - Thrown when client request fails or user does not exist.public io.getlime.core.rest.model.base.response.ObjectResponse<CreateSmsAuthorizationResponse> createAuthorizationSms(String userId, String organizationId, OperationContext operationContext, String lang, boolean resend) throws DataAdapterClientErrorException
userId - User ID.organizationId - Organization ID.operationContext - Operation context.lang - Language for i18n.resend - Whether SMS is being resent.DataAdapterClientErrorException - Thrown when client request fails or SMS could not be delivered.public io.getlime.core.rest.model.base.response.ObjectResponse<VerifySmsAuthorizationResponse> verifyAuthorizationSms(String messageId, String authorizationCode, String userId, String organizationId, OperationContext operationContext) throws DataAdapterClientErrorException
messageId - Message ID.authorizationCode - User entered authorization code.userId - User ID.organizationId - Organization ID.operationContext - Operation context.DataAdapterClientErrorException - Thrown when client request fails or SMS code authorization fails.public io.getlime.core.rest.model.base.response.ObjectResponse<VerifySmsAndPasswordResponse> verifyAuthorizationSmsAndPassword(String messageId, String authorizationCode, String userId, String organizationId, String password, AuthenticationContext authenticationContext, OperationContext operationContext) throws DataAdapterClientErrorException
messageId - Message ID.authorizationCode - User entered authorization code.userId - User ID for this authentication request.organizationId - Organization ID for this authentication request.password - Password for this authentication request, optionally encrypted.authenticationContext - Authentication context.operationContext - Operation context.DataAdapterClientErrorException - Thrown when client request fails or authentication/authorization fails.public io.getlime.core.rest.model.base.response.ObjectResponse<DecorateOperationFormDataResponse> decorateOperationFormData(String userId, String organizationId, OperationContext operationContext) throws DataAdapterClientErrorException
userId - User ID of the user for this request.organizationId - Organization ID for this request.operationContext - Operation context.DataAdapterClientErrorException - Thrown when client request fails.public io.getlime.core.rest.model.base.response.ObjectResponse formDataChangedNotification(FormDataChange formDataChange, String userId, String organizationId, OperationContext operationContext) throws DataAdapterClientErrorException
formDataChange - Operation form data change.userId - User ID.organizationId - Organization ID.operationContext - Operation context.DataAdapterClientErrorException - Thrown when client request fails.public io.getlime.core.rest.model.base.response.ObjectResponse operationChangedNotification(OperationChange operationChange, String userId, String organizationId, OperationContext operationContext) throws DataAdapterClientErrorException
operationChange - Operation change.userId - User ID.organizationId - Organization ID.operationContext - Operation context.DataAdapterClientErrorException - Thrown when client request fails.public io.getlime.core.rest.model.base.response.ObjectResponse<InitConsentFormResponse> initConsentForm(String userId, String organizationId, OperationContext operationContext) throws DataAdapterClientErrorException
userId - User ID.organizationId - Organization ID.operationContext - Operation context.DataAdapterClientErrorException - Thrown when client request fails.public io.getlime.core.rest.model.base.response.ObjectResponse<CreateConsentFormResponse> createConsentForm(String userId, String organizationId, OperationContext operationContext, String lang) throws DataAdapterClientErrorException
userId - User ID.organizationId - Organization ID.operationContext - Operation context.lang - Language of the text in the consent form.DataAdapterClientErrorException - Thrown when client request fails.public io.getlime.core.rest.model.base.response.ObjectResponse<ValidateConsentFormResponse> validateConsentForm(String userId, String organizationId, OperationContext operationContext, String lang, List<ConsentOption> options) throws DataAdapterClientErrorException
userId - User ID.organizationId - Organization ID.operationContext - Operation context.lang - Language of the text in the consent form.options - Consent options selected by the user.DataAdapterClientErrorException - Thrown when client request fails.public io.getlime.core.rest.model.base.response.ObjectResponse<SaveConsentFormResponse> saveConsentForm(String userId, String organizationId, OperationContext operationContext, List<ConsentOption> options) throws DataAdapterClientErrorException
userId - User ID.organizationId - Organization ID.operationContext - Operation context.options - Consent options selected by the user.DataAdapterClientErrorException - Thrown when client request fails.Copyright © 2016–2019 Wultra s.r.o.. All rights reserved.