# s2s-client-auth

Rainbow authentication portal
- API version: 1.104.0
  - Build date: 2020-02-13T18:40:41.602485+01:00[Europe/Paris]

# Rainbow authentication portal API guide  ## Preamble  [Download Postman collection][0]  ### Introduction  This guide describes list of API services that are provided by OT Rainbow authentication portal system. Services are used to manage OT Rainbow authentication.  ### Protocol  REST interface is used for sending/receiving OT rainbow API messages.   HTTP request GET is used. Standard HTTP responses are used to provide requested information or error status. There is no session notion in OT Rainbow system, so requests could be issued according stateless model, without transport conservation between them.   JSON is used as a main format for data encoding in message body part. Each request is started with the following pattern /{module}/{version}/ where {module} is a portal module name to address and {version} is a version of used API, par example, “v1.0”.  ### Security considerations  Each request should contain some credential information to authenticate itself. Standard HTTP authentication with basic/bearer modes is used. JSON Web Token mechanism is used to provide authentication information. JWT has a expire timeout that is controlled by OT Rainbow portal to prevent very long token usage. Also authentication with application token is used. The token must be provided in the request HTTP header, using a custom header: APIKey. At server side, token is verified, and if it doesn’t match, 403 Not Allowed response is sent. TLS is used as a transport protocol to support message exchanges between OT Rainbow portal and an application.    [0]: AuthenticationPortalServer_postman.json


*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*


## Requirements

Building the API client library requires:
1. Java 1.7+
2. Maven/Gradle

## Installation

To install the API client library to your local Maven repository, simply execute:

```shell
mvn clean install
```

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

```shell
mvn clean deploy
```

Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.

### Maven users

Add this dependency to your project's POM:

```xml
<dependency>
  <groupId>com.ale.rainbow.s2s</groupId>
  <artifactId>s2s-client-auth</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>
```

### Gradle users

Add this dependency to your project's build file:

```groovy
compile "com.ale.rainbow.s2s:s2s-client-auth:1.0.0"
```

### Others

At first generate the JAR by executing:

```shell
mvn clean package
```

Then manually install the following JARs:

* `target/s2s-client-auth-1.0.0.jar`
* `target/lib/*.jar`

## Getting Started

Please follow the [installation](#installation) instruction and execute the following Java code:

```java

// Import classes:
import com.ale.rainbow.s2s.client.auth.ApiClient;
import com.ale.rainbow.s2s.client.auth.ApiException;
import com.ale.rainbow.s2s.client.auth.Configuration;
import com.ale.rainbow.s2s.client.auth.auth.*;
import com.ale.rainbow.s2s.client.auth.models.*;
import com.ale.rainbow.s2s.client.auth.api.AuthenticationApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: Bearer
    ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
    Bearer.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //Bearer.setApiKeyPrefix("Token");

    AuthenticationApi apiInstance = new AuthenticationApi(defaultClient);
    String accept = "accept_example"; // String | application/json
    try {
      GetApiRainbowAuthenticationV10ValidatorSuccess result = apiInstance.getApiRainbowAuthenticationV10Validator(accept);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthenticationApi#getApiRainbowAuthenticationV10Validator");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AuthenticationApi* | [**getApiRainbowAuthenticationV10Validator**](docs/AuthenticationApi.md#getApiRainbowAuthenticationV10Validator) | **GET** /api/rainbow/authentication/v1.0/validator | Validate user JWT
*AuthenticationApi* | [**getBasicLogin**](docs/AuthenticationApi.md#getBasicLogin) | **GET** /api/rainbow/authentication/v1.0/login | Login user
*AuthenticationApi* | [**getLogout**](docs/AuthenticationApi.md#getLogout) | **GET** /api/rainbow/authentication/v1.0/logout | Logout user
*AuthenticationApi* | [**getRenew**](docs/AuthenticationApi.md#getRenew) | **GET** /api/rainbow/authentication/v1.0/renew | Renew user JWT
*AuthenticationUrlsApi* | [**getLoginUrl**](docs/AuthenticationUrlsApi.md#getLoginUrl) | **GET** /api/rainbow/authentication/v1.0/urls | Get user authentication URLs
*CommonApi* | [**deleteMetrics**](docs/CommonApi.md#deleteMetrics) | **DELETE** /api/rainbow/metrics | Clear performance metrics
*CommonApi* | [**getApiRainbowAuthenticationV10About**](docs/CommonApi.md#getApiRainbowAuthenticationV10About) | **GET** /api/rainbow/authentication/v1.0/about | About authentication portal
*CommonApi* | [**getApiRainbowPing**](docs/CommonApi.md#getApiRainbowPing) | **GET** /api/rainbow/ping | Get authentication portal status report
*CommonApi* | [**getMetrics**](docs/CommonApi.md#getMetrics) | **GET** /api/rainbow/metrics | Get performance metrics
*CommonApi* | [**putApiRainbowLogsLevels**](docs/CommonApi.md#putApiRainbowLogsLevels) | **PUT** /api/rainbow/logs/levels | Change log level
*OauthAuthenticationApi* | [**oAuthAuthorize**](docs/OauthAuthenticationApi.md#oAuthAuthorize) | **GET** /api/rainbow/authentication/v1.0/oauth/authorize | 1 - OAuth Authorization Request
*OauthAuthenticationApi* | [**oAuthToken**](docs/OauthAuthenticationApi.md#oAuthToken) | **POST** /api/rainbow/authentication/v1.0/oauth/token | 2 - OAuth Access Token Request
*OauthTokensApi* | [**deleteOAuthToken**](docs/OauthTokensApi.md#deleteOAuthToken) | **DELETE** /api/rainbow/authentication/v1.0/oauth/tokens/{tokenId} | Delete an OAuth token
*OauthTokensApi* | [**getOAuthToken**](docs/OauthTokensApi.md#getOAuthToken) | **GET** /api/rainbow/authentication/v1.0/oauth/tokens | Get all OAuth token
*OauthTokensApi* | [**getOAuthTokenById**](docs/OauthTokensApi.md#getOAuthTokenById) | **GET** /api/rainbow/authentication/v1.0/oauth/tokens/{tokenId} | Get an OAuth token
*OidcClientApi* | [**getJwt**](docs/OidcClientApi.md#getJwt) | **GET** /api/rainbow/authentication/v1.0/oidc-client/jwt | Get a JWT from an id_token
*OidcClientApi* | [**getOidcLogin**](docs/OidcClientApi.md#getOidcLogin) | **GET** /api/rainbow/authentication/v1.0/oidc-client/login | Initiate an OIDC authentication
*SamlAuthenticationApi* | [**getSamlAssertion**](docs/SamlAuthenticationApi.md#getSamlAssertion) | **GET** /api/rainbow/authentication/v1.0/saml/{companyId}/assert | IDP logout response
*SamlAuthenticationApi* | [**getSamlAssertionConfiguration**](docs/SamlAuthenticationApi.md#getSamlAssertionConfiguration) | **GET** /api/rainbow/authentication/v1.0/saml/{companyId}/metadata.xml | Get assertion configuration for a company
*SamlAuthenticationApi* | [**getSamlLogin**](docs/SamlAuthenticationApi.md#getSamlLogin) | **GET** /api/rainbow/authentication/v1.0/saml/login | Initiate an SAML authentication
*SamlAuthenticationApi* | [**getSamlLogout**](docs/SamlAuthenticationApi.md#getSamlLogout) | **GET** /api/rainbow/authentication/v1.0/saml/logout | Close SAML session
*SamlAuthenticationApi* | [**postSamlAssertion**](docs/SamlAuthenticationApi.md#postSamlAssertion) | **POST** /api/rainbow/authentication/v1.0/saml/{companyId}/assert | IDP authentication response


## Documentation for Models

 - [DeleteMetricsSuccess](docs/DeleteMetricsSuccess.md)
 - [DeleteOAuthTokenSuccess](docs/DeleteOAuthTokenSuccess.md)
 - [DeleteOAuthTokenSuccessData](docs/DeleteOAuthTokenSuccessData.md)
 - [GetApiRainbowAuthenticationV10AboutSuccess](docs/GetApiRainbowAuthenticationV10AboutSuccess.md)
 - [GetApiRainbowAuthenticationV10ValidatorSuccess](docs/GetApiRainbowAuthenticationV10ValidatorSuccess.md)
 - [GetApiRainbowPingSuccess](docs/GetApiRainbowPingSuccess.md)
 - [GetBasicLoginSuccess](docs/GetBasicLoginSuccess.md)
 - [GetBasicLoginSuccessEmails](docs/GetBasicLoginSuccessEmails.md)
 - [GetBasicLoginSuccessLoggedInApplication](docs/GetBasicLoginSuccessLoggedInApplication.md)
 - [GetBasicLoginSuccessLoggedInUser](docs/GetBasicLoginSuccessLoggedInUser.md)
 - [GetBasicLoginSuccessLoggedInUserCreatedByAdmin](docs/GetBasicLoginSuccessLoggedInUserCreatedByAdmin.md)
 - [GetBasicLoginSuccessPhoneNumbers](docs/GetBasicLoginSuccessPhoneNumbers.md)
 - [GetBasicLoginSuccessProfiles](docs/GetBasicLoginSuccessProfiles.md)
 - [GetBasicLoginSuccessProvisioningNeeded](docs/GetBasicLoginSuccessProvisioningNeeded.md)
 - [GetJwtSuccess](docs/GetJwtSuccess.md)
 - [GetJwtSuccessEmails](docs/GetJwtSuccessEmails.md)
 - [GetJwtSuccessLoggedInUser](docs/GetJwtSuccessLoggedInUser.md)
 - [GetJwtSuccessPhoneNumbers](docs/GetJwtSuccessPhoneNumbers.md)
 - [GetJwtSuccessProfiles](docs/GetJwtSuccessProfiles.md)
 - [GetJwtSuccessProvisioningNeeded](docs/GetJwtSuccessProvisioningNeeded.md)
 - [GetLoginUrlSuccess](docs/GetLoginUrlSuccess.md)
 - [GetLoginUrlSuccessData](docs/GetLoginUrlSuccessData.md)
 - [GetLogoutSuccess](docs/GetLogoutSuccess.md)
 - [GetMetricsSuccess](docs/GetMetricsSuccess.md)
 - [GetOAuthTokenByIdSuccess](docs/GetOAuthTokenByIdSuccess.md)
 - [GetOAuthTokenSuccess](docs/GetOAuthTokenSuccess.md)
 - [GetOidcLoginSuccess](docs/GetOidcLoginSuccess.md)
 - [GetRenewSuccess](docs/GetRenewSuccess.md)
 - [GetRenewSuccessEmails](docs/GetRenewSuccessEmails.md)
 - [GetRenewSuccessLoggedInUser](docs/GetRenewSuccessLoggedInUser.md)
 - [GetRenewSuccessPhoneNumbers](docs/GetRenewSuccessPhoneNumbers.md)
 - [GetRenewSuccessProfiles](docs/GetRenewSuccessProfiles.md)
 - [GetRenewSuccessProvisioningNeeded](docs/GetRenewSuccessProvisioningNeeded.md)
 - [GetSamlAssertionConfigurationSuccess](docs/GetSamlAssertionConfigurationSuccess.md)
 - [GetSamlAssertionSuccess](docs/GetSamlAssertionSuccess.md)
 - [GetSamlLoginSuccess](docs/GetSamlLoginSuccess.md)
 - [GetSamlLogoutSuccess](docs/GetSamlLogoutSuccess.md)
 - [OAuthAuthorizeSuccess](docs/OAuthAuthorizeSuccess.md)
 - [OAuthToken](docs/OAuthToken.md)
 - [OAuthTokenSuccess](docs/OAuthTokenSuccess.md)
 - [PostSamlAssertion](docs/PostSamlAssertion.md)
 - [PostSamlAssertionSuccess](docs/PostSamlAssertionSuccess.md)
 - [PostSamlAssertionSuccessEmails](docs/PostSamlAssertionSuccessEmails.md)
 - [PostSamlAssertionSuccessLoggedInUser](docs/PostSamlAssertionSuccessLoggedInUser.md)
 - [PostSamlAssertionSuccessPhoneNumbers](docs/PostSamlAssertionSuccessPhoneNumbers.md)
 - [PostSamlAssertionSuccessProfiles](docs/PostSamlAssertionSuccessProfiles.md)
 - [PostSamlAssertionSuccessProvisioningNeeded](docs/PostSamlAssertionSuccessProvisioningNeeded.md)
 - [PutApiRainbowLogsLevels](docs/PutApiRainbowLogsLevels.md)
 - [PutApiRainbowLogsLevelsSuccess](docs/PutApiRainbowLogsLevelsSuccess.md)
 - [PutApiRainbowLogsLevelsSuccessNewLoggerLevels](docs/PutApiRainbowLogsLevelsSuccessNewLoggerLevels.md)
 - [PutApiRainbowLogsLevelsSuccessOldLoggerLevels](docs/PutApiRainbowLogsLevelsSuccessOldLoggerLevels.md)


## Documentation for Authorization

Authentication schemes defined for the API:
### Basic

- **Type**: HTTP basic authentication

### Bearer

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header


## Recommendation

It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.

## Author



