Package co.privacyone.sdk.restapi.rest
Class RestClient
java.lang.Object
co.privacyone.sdk.restapi.rest.RestApi
co.privacyone.sdk.restapi.rest.RestClient
RestClient integrate the authentication to Cerberus with RestApi
-
Field Summary
Fields inherited from class co.privacyone.sdk.restapi.rest.RestApi
SC_UNAUTHORIZED -
Constructor Summary
ConstructorsConstructorDescriptionRestClient(String schema, String authenticationHost, int authenticationPort, String accountName, String accountPassword) -
Method Summary
Modifier and TypeMethodDescriptionco.privacyone.cerberus.restmodel.account.AuthResponseModelco.privacyone.cerberus.restmodel.account.AuthResponseModelauthenticateForUser(String userId) okhttp3.Responseokhttp3.Responseokhttp3.Responseokhttp3.Responseokhttp3.Response
-
Constructor Details
-
RestClient
-
-
Method Details
-
authenticate
public co.privacyone.cerberus.restmodel.account.AuthResponseModel authenticate() throws RemoteServiceException- Throws:
RemoteServiceException
-
authenticateForUser
public co.privacyone.cerberus.restmodel.account.AuthResponseModel authenticateForUser(String userId) throws RemoteServiceException - Throws:
RemoteServiceException
-
head
public okhttp3.Response head(okhttp3.HttpUrl url, Optional<okhttp3.Headers> headers) throws RemoteServiceException - Overrides:
headin classRestApi- Throws:
RemoteServiceException
-
get
public okhttp3.Response get(okhttp3.HttpUrl url, Optional<okhttp3.Headers> headers) throws RemoteServiceException - Overrides:
getin classRestApi- Throws:
RemoteServiceException
-
post
public okhttp3.Response post(okhttp3.HttpUrl url, okhttp3.RequestBody requestBody, Optional<okhttp3.Headers> headers) throws RemoteServiceException - Overrides:
postin classRestApi- Throws:
RemoteServiceException
-
delete
public okhttp3.Response delete(okhttp3.HttpUrl url, Optional<okhttp3.Headers> headers, @Nullable okhttp3.RequestBody requestBody) throws RemoteServiceException - Overrides:
deletein classRestApi- Throws:
RemoteServiceException
-
put
public okhttp3.Response put(okhttp3.HttpUrl url, okhttp3.RequestBody requestBody, Optional<okhttp3.Headers> headers) throws RemoteServiceException - Overrides:
putin classRestApi- Throws:
RemoteServiceException
-