Package co.privacyone.sdk.restapi.rest
Class RestClient
- java.lang.Object
-
- co.privacyone.sdk.restapi.rest.RestApi
-
- co.privacyone.sdk.restapi.rest.RestClient
-
public class RestClient extends RestApi
RestClient integrate the authentication to Cerberus with RestApi
-
-
Field Summary
-
Fields inherited from class co.privacyone.sdk.restapi.rest.RestApi
SC_UNAUTHORIZED
-
-
Constructor Summary
Constructors Constructor Description RestClient(java.lang.String schema, java.lang.String authenticationHost, int authenticationPort, java.lang.String accountName, java.lang.String accountPassword)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description co.privacyone.cerberus.restmodel.account.AuthResponseModelauthenticate()co.privacyone.cerberus.restmodel.account.AuthResponseModelauthenticateForUser(java.lang.String userId)okhttp3.Responsedelete(okhttp3.HttpUrl url, java.util.Optional<okhttp3.Headers> headers, okhttp3.RequestBody requestBody)okhttp3.Responseget(okhttp3.HttpUrl url, java.util.Optional<okhttp3.Headers> headers)okhttp3.Responsehead(okhttp3.HttpUrl url, java.util.Optional<okhttp3.Headers> headers)okhttp3.Responsepost(okhttp3.HttpUrl url, okhttp3.RequestBody requestBody, java.util.Optional<okhttp3.Headers> headers)okhttp3.Responseput(okhttp3.HttpUrl url, okhttp3.RequestBody requestBody, java.util.Optional<okhttp3.Headers> headers)
-
-
-
Method Detail
-
authenticate
public co.privacyone.cerberus.restmodel.account.AuthResponseModel authenticate() throws RemoteServiceException- Throws:
RemoteServiceException
-
authenticateForUser
public co.privacyone.cerberus.restmodel.account.AuthResponseModel authenticateForUser(java.lang.String userId) throws RemoteServiceException- Throws:
RemoteServiceException
-
head
public okhttp3.Response head(okhttp3.HttpUrl url, java.util.Optional<okhttp3.Headers> headers) throws RemoteServiceException- Overrides:
headin classRestApi- Throws:
RemoteServiceException
-
get
public okhttp3.Response get(okhttp3.HttpUrl url, java.util.Optional<okhttp3.Headers> headers) throws RemoteServiceException- Overrides:
getin classRestApi- Throws:
RemoteServiceException
-
post
public okhttp3.Response post(okhttp3.HttpUrl url, okhttp3.RequestBody requestBody, java.util.Optional<okhttp3.Headers> headers) throws RemoteServiceException- Overrides:
postin classRestApi- Throws:
RemoteServiceException
-
delete
public okhttp3.Response delete(okhttp3.HttpUrl url, java.util.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, java.util.Optional<okhttp3.Headers> headers) throws RemoteServiceException- Overrides:
putin classRestApi- Throws:
RemoteServiceException
-
-