Class OAuth2Service
- java.lang.Object
-
- io.jans.ca.plugin.adminui.service.BaseService
-
- io.jans.ca.plugin.adminui.service.auth.OAuth2Service
-
@Singleton public class OAuth2Service extends BaseService
-
-
Constructor Summary
Constructors Constructor Description OAuth2Service()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenResponse
getApiProtectionToken(ApiTokenRequest apiTokenRequest, String appType)
The function `getApiProtectionToken` retrieves an API protection token based on the provided parameters and handles exceptions accordingly.-
Methods inherited from class io.jans.ca.plugin.adminui.service.BaseService
executeDCR, getClaims, getToken, getToken, introspectToken
-
-
-
-
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` objectappType
- 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
-
-