Package com.symphony.bdk.core.auth.impl
Class ExtensionAppAuthenticatorRsaImpl
java.lang.Object
com.symphony.bdk.core.auth.impl.AbstractExtensionAppAuthenticator
com.symphony.bdk.core.auth.impl.ExtensionAppAuthenticatorRsaImpl
- All Implemented Interfaces:
ExtensionAppAuthenticator
@API(status=INTERNAL)
public class ExtensionAppAuthenticatorRsaImpl
extends AbstractExtensionAppAuthenticator
Extension app authenticator RSA implementation.
- See Also:
-
Field Summary
Fields inherited from class com.symphony.bdk.core.auth.impl.AbstractExtensionAppAuthenticator
appId, tokensRepository
-
Constructor Summary
ConstructorDescriptionExtensionAppAuthenticatorRsaImpl
(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig, String appId, PrivateKey appPrivateKey, com.symphony.bdk.http.api.ApiClient loginApiClient, com.symphony.bdk.http.api.ApiClient podApiClient) ExtensionAppAuthenticatorRsaImpl
(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig, String appId, PrivateKey appPrivateKey, com.symphony.bdk.http.api.ApiClient loginApiClient, com.symphony.bdk.http.api.ApiClient podApiClient, ExtensionAppTokensRepository tokensRepository) -
Method Summary
Modifier and TypeMethodDescriptionprotected ExtensionAppTokens
authenticateAndRetrieveTokens
(String appToken) authenticateExtensionApp
(String appToken) Authenticates an extension app.protected PodCertificate
protected String
protected String
validateJwt
(String jwt) Validates a JWT against the pod certificateMethods inherited from class com.symphony.bdk.core.auth.impl.AbstractExtensionAppAuthenticator
getPodCertificate, retrieveExtAppTokens, retrieveExtensionAppSession, validateTokens
-
Constructor Details
-
ExtensionAppAuthenticatorRsaImpl
public ExtensionAppAuthenticatorRsaImpl(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig, String appId, PrivateKey appPrivateKey, com.symphony.bdk.http.api.ApiClient loginApiClient, com.symphony.bdk.http.api.ApiClient podApiClient) -
ExtensionAppAuthenticatorRsaImpl
public ExtensionAppAuthenticatorRsaImpl(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig, String appId, PrivateKey appPrivateKey, com.symphony.bdk.http.api.ApiClient loginApiClient, com.symphony.bdk.http.api.ApiClient podApiClient, ExtensionAppTokensRepository tokensRepository)
-
-
Method Details
-
authenticateExtensionApp
@Nonnull public AppAuthSession authenticateExtensionApp(@Nonnull String appToken) throws AuthUnauthorizedException Authenticates an extension app.- Parameters:
appToken
- The token generated by application backend.- Returns:
- the extension app authentication session.
- Throws:
AuthUnauthorizedException
- when the bot is unauthorized.
-
authenticateAndRetrieveTokens
protected ExtensionAppTokens authenticateAndRetrieveTokens(String appToken) throws com.symphony.bdk.http.api.ApiException - Specified by:
authenticateAndRetrieveTokens
in classAbstractExtensionAppAuthenticator
- Throws:
com.symphony.bdk.http.api.ApiException
-
callGetPodCertificate
- Specified by:
callGetPodCertificate
in classAbstractExtensionAppAuthenticator
- Throws:
com.symphony.bdk.http.api.ApiException
-
getAuthenticationBasePath
- Specified by:
getAuthenticationBasePath
in classAbstractExtensionAppAuthenticator
-
getPodCertificateBasePath
- Specified by:
getPodCertificateBasePath
in classAbstractExtensionAppAuthenticator
-
validateJwt
Validates a JWT against the pod certificate- Parameters:
jwt
- the JWT to be validated- Returns:
- the
UserClaim
containing all information in JWT claim "user" if JWT successfully validated - Throws:
AuthInitializationException
- if JWT cannot be validated or if JWT is invalid- See Also:
-