Skip to content

Latest commit

 

History

History
294 lines (232 loc) · 9.32 KB

File metadata and controls

294 lines (232 loc) · 9.32 KB

AuthenticationApi

All URIs are relative to http://localhost

Method HTTP request Description
authCookieLogin POST /auth/cookie/login Auth:Cookie.Login
authCookieLogout POST /auth/cookie/logout Auth:Cookie.Logout
authJwtLogin POST /auth/jwt/login Auth:Jwt.Login
authJwtLogout POST /auth/jwt/logout Auth:Jwt.Logout

authCookieLogin

Object authCookieLogin(username, password, grantType, scope, clientId, clientSecret)

Auth:Cookie.Login

Example

// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.models.*;
import org.cms.client.api.AuthenticationApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");

    AuthenticationApi apiInstance = new AuthenticationApi(defaultClient);
    String username = "username_example"; // String | 
    String password = "password_example"; // String | 
    String grantType = "grantType_example"; // String | 
    String scope = ""; // String | 
    String clientId = "clientId_example"; // String | 
    String clientSecret = "clientSecret_example"; // String | 
    try {
      Object result = apiInstance.authCookieLogin(username, password, grantType, scope, clientId, clientSecret);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationApi#authCookieLogin");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
username String
password String
grantType String [optional]
scope String [optional] [default to ]
clientId String [optional]
clientSecret String [optional]

Return type

Object

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
400 Bad Request -
204 No Content -
422 Validation Error -

authCookieLogout

Object authCookieLogout()

Auth:Cookie.Logout

Example

// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.AuthenticationApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure OAuth2 access token for authorization: OAuth2PasswordBearer
    OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
    OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");

    // Configure API key authorization: APIKeyCookie
    ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
    APIKeyCookie.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyCookie.setApiKeyPrefix("Token");

    AuthenticationApi apiInstance = new AuthenticationApi(defaultClient);
    try {
      Object result = apiInstance.authCookieLogout();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationApi#authCookieLogout");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

Object

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
401 Missing token or inactive user. -
204 No Content -

authJwtLogin

BearerResponse authJwtLogin(username, password, grantType, scope, clientId, clientSecret)

Auth:Jwt.Login

Example

// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.models.*;
import org.cms.client.api.AuthenticationApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");

    AuthenticationApi apiInstance = new AuthenticationApi(defaultClient);
    String username = "username_example"; // String | 
    String password = "password_example"; // String | 
    String grantType = "grantType_example"; // String | 
    String scope = ""; // String | 
    String clientId = "clientId_example"; // String | 
    String clientSecret = "clientSecret_example"; // String | 
    try {
      BearerResponse result = apiInstance.authJwtLogin(username, password, grantType, scope, clientId, clientSecret);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationApi#authJwtLogin");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
username String
password String
grantType String [optional]
scope String [optional] [default to ]
clientId String [optional]
clientSecret String [optional]

Return type

BearerResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
400 Bad Request -
422 Validation Error -

authJwtLogout

Object authJwtLogout()

Auth:Jwt.Logout

Example

// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.AuthenticationApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure OAuth2 access token for authorization: OAuth2PasswordBearer
    OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
    OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");

    // Configure API key authorization: APIKeyCookie
    ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
    APIKeyCookie.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyCookie.setApiKeyPrefix("Token");

    AuthenticationApi apiInstance = new AuthenticationApi(defaultClient);
    try {
      Object result = apiInstance.authJwtLogout();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationApi#authJwtLogout");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

Object

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
401 Missing token or inactive user. -