Package com.symphony.bdk.core.auth.impl
Class AbstractExtensionAppAuthenticator
java.lang.Object
com.symphony.bdk.core.auth.impl.AbstractExtensionAppAuthenticator
- All Implemented Interfaces:
ExtensionAppAuthenticator
- Direct Known Subclasses:
ExtensionAppAuthenticatorCertImpl
,ExtensionAppAuthenticatorRsaImpl
@API(status=INTERNAL)
public abstract class AbstractExtensionAppAuthenticator
extends Object
implements ExtensionAppAuthenticator
Abstract class to factorize the
ExtensionAppAuthenticator
logic between RSA and certificate,
especially the retry logic on top of HTTP calls.-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected final ExtensionAppTokensRepository
-
Constructor Summary
ConstructorDescriptionAbstractExtensionAppAuthenticator
(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig, String appId) AbstractExtensionAppAuthenticator
(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig, String appId, ExtensionAppTokensRepository tokensRepository) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ExtensionAppTokens
authenticateAndRetrieveTokens
(String appToken) protected abstract PodCertificate
protected abstract String
Retrieves the pod certificate.protected abstract String
protected ExtensionAppTokens
retrieveExtAppTokens
(String appToken) protected ExtensionAppTokens
retrieveExtensionAppSession
(String appToken) boolean
validateTokens
(String appToken, String symphonyToken) Validates if appToken and symphonyToken corresponds to an existing sessionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.symphony.bdk.core.auth.ExtensionAppAuthenticator
authenticateExtensionApp, validateJwt
-
Field Details
-
appId
-
tokensRepository
-
-
Constructor Details
-
AbstractExtensionAppAuthenticator
public AbstractExtensionAppAuthenticator(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig, String appId) -
AbstractExtensionAppAuthenticator
public AbstractExtensionAppAuthenticator(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig, String appId, ExtensionAppTokensRepository tokensRepository)
-
-
Method Details
-
validateTokens
Validates if appToken and symphonyToken corresponds to an existing session- Specified by:
validateTokens
in interfaceExtensionAppAuthenticator
- Parameters:
appToken
- the appTokensymphonyToken
- the symphonyToken- Returns:
- true if symphonyToken associated to a previous session initiated with appToken
-
getPodCertificate
Retrieves the pod certificate. Useful when validating JWT tokens.- Specified by:
getPodCertificate
in interfaceExtensionAppAuthenticator
- Returns:
- the pod certificate
-
retrieveExtensionAppSession
protected ExtensionAppTokens retrieveExtensionAppSession(String appToken) throws AuthUnauthorizedException - Throws:
AuthUnauthorizedException
-
retrieveExtAppTokens
- Throws:
AuthUnauthorizedException
-
callGetPodCertificate
protected abstract PodCertificate callGetPodCertificate() throws com.symphony.bdk.http.api.ApiException- Throws:
com.symphony.bdk.http.api.ApiException
-
authenticateAndRetrieveTokens
protected abstract ExtensionAppTokens authenticateAndRetrieveTokens(String appToken) throws com.symphony.bdk.http.api.ApiException - Throws:
com.symphony.bdk.http.api.ApiException
-
getPodCertificateBasePath
-
getAuthenticationBasePath
-