Package org.bonitasoft.web.client.api
Interface AuthenticationApi
-
- All Superinterfaces:
ApiClient.Api
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public interface AuthenticationApi extends ApiClient.Api
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAuthenticationApi.LogoutQueryParamsA convenience class for generating query parameters for thelogoutmethod in a fluent style.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringlogin(String username, String password, String tenant, String redirect, String redirectURL)Login A call to the `/loginservice` will generates a set-cookie header in the response.ApiResponse<String>loginWithHttpInfo(String username, String password, String tenant, String redirect, String redirectURL)Login Similar tologinbut it also returns the http response headers .voidlogout(String redirect)Logout the current user Logout the current user from the systemvoidlogout(Map<String,Object> queryParams)Logout the current user Logout the current user from the system Note, this is equivalent to the otherlogoutmethod, but with the query parameters collected into a single Map parameter.ApiResponse<Void>logoutWithHttpInfo(String redirect)Logout the current user Similar tologoutbut it also returns the http response headers .ApiResponse<Void>logoutWithHttpInfo(Map<String,Object> queryParams)Logout the current user Logout the current user from the system Note, this is equivalent to the otherlogoutthat receives the query parameters as a map, but this one also exposes the Http response headers
-
-
-
Method Detail
-
login
String login(String username, String password, String tenant, String redirect, String redirectURL)
Login A call to the `/loginservice` will generates a set-cookie header in the response. The `JSESSIONID` cookie must be transfered with each subsequent calls. (If the REST API is used in an application running in a web browser, this is handled automatically by the web browser just like any cookies). Additional protection agains CSRF attacks is enabled by default for all fresh installations This security relies on `X-Bonita-API-Token` information. The `X-Bonita-API-Token` value can be found in the cookie named: `X-Bonita-API-Token`. All the subsequence REST API calls performing changes in the system using DELETE, POST, or PUT HTTP methods must contain the **HTTP header** below: ``` X-Bonita-API-Token: example-dummy-not-be-used-value ```- Parameters:
username- the username (required)password- the password (required)tenant- the user tenant (optional)redirect- \\\"true\\\" or \\\"false\\\". \\\"false\\\" indicates that the service should not redirect to Bonita Portal (after a successful login) or to the login page (after a login failure). (optional, default to "false")redirectURL- the URL of the page to be displayed after login (optional, default to "")- Returns:
- String
-
loginWithHttpInfo
ApiResponse<String> loginWithHttpInfo(String username, String password, String tenant, String redirect, String redirectURL)
Login Similar tologinbut it also returns the http response headers . A call to the `/loginservice` will generates a set-cookie header in the response. The `JSESSIONID` cookie must be transfered with each subsequent calls. (If the REST API is used in an application running in a web browser, this is handled automatically by the web browser just like any cookies). Additional protection agains CSRF attacks is enabled by default for all fresh installations This security relies on `X-Bonita-API-Token` information. The `X-Bonita-API-Token` value can be found in the cookie named: `X-Bonita-API-Token`. All the subsequence REST API calls performing changes in the system using DELETE, POST, or PUT HTTP methods must contain the **HTTP header** below: ``` X-Bonita-API-Token: example-dummy-not-be-used-value ```- Parameters:
username- the username (required)password- the password (required)tenant- the user tenant (optional)redirect- \\\"true\\\" or \\\"false\\\". \\\"false\\\" indicates that the service should not redirect to Bonita Portal (after a successful login) or to the login page (after a login failure). (optional, default to "false")redirectURL- the URL of the page to be displayed after login (optional, default to "")- Returns:
- A ApiResponse that wraps the response boyd and the http headers.
-
logout
void logout(String redirect)
Logout the current user Logout the current user from the system- Parameters:
redirect- Setting the redirect parameter to false indicates that the service should not redirect to the login page after logging out. (optional)
-
logoutWithHttpInfo
ApiResponse<Void> logoutWithHttpInfo(String redirect)
Logout the current user Similar tologoutbut it also returns the http response headers . Logout the current user from the system- Parameters:
redirect- Setting the redirect parameter to false indicates that the service should not redirect to the login page after logging out. (optional)
-
logout
void logout(Map<String,Object> queryParams)
Logout the current user Logout the current user from the system Note, this is equivalent to the otherlogoutmethod, but with the query parameters collected into a single Map parameter. This is convenient for services with optional query parameters, especially when used with theAuthenticationApi.LogoutQueryParamsclass that allows for building up this map in a fluent style.- Parameters:
queryParams- Map of query parameters as name-value pairsThe following elements may be specified in the query map:
- redirect - Setting the redirect parameter to false indicates that the service should not redirect to the login page after logging out. (optional)
-
logoutWithHttpInfo
ApiResponse<Void> logoutWithHttpInfo(Map<String,Object> queryParams)
Logout the current user Logout the current user from the system Note, this is equivalent to the otherlogoutthat receives the query parameters as a map, but this one also exposes the Http response headers- Parameters:
queryParams- Map of query parameters as name-value pairsThe following elements may be specified in the query map:
- redirect - Setting the redirect parameter to false indicates that the service should not redirect to the login page after logging out. (optional)
-
-