Class OAuth2Service


  • @Singleton
    public class OAuth2Service
    extends BaseService
    • Constructor Detail

      • OAuth2Service

        public OAuth2Service()
    • Method Detail

      • getApiProtectionToken

        public TokenResponse getApiProtectionToken​(ApiTokenRequest apiTokenRequest,
                                                   String appType)
                                            throws ApplicationException
        The function `getApiProtectionToken` retrieves an API protection token based on the provided parameters and handles exceptions accordingly.
        Parameters:
        apiTokenRequest - The `getApiProtectionToken` method is responsible for obtaining an API protection token based on the provided `ApiTokenRequest` and `appType`. The method first retrieves the necessary configuration from `auiConfigurationService` based on the `appType`. It then constructs a `TokenRequest` object
        appType - The `appType` parameter in the `getApiProtectionToken` method is used to specify the type of the application for which the API protection token is being requested. It is passed as a String parameter to the method. The `appType` parameter helps in determining the specific configuration settings and endpoints
        Returns:
        The method `getApiProtectionToken` returns a `TokenResponse` object containing the access token, id token, refresh token, scopes, iat (issued at) timestamp, exp (expiration) timestamp, and issuer information.
        Throws:
        ApplicationException