Package com.symphony.bdk.core.auth.impl
Class AbstractBotAuthenticator
java.lang.Object
com.symphony.bdk.core.auth.impl.AbstractBotAuthenticator
- All Implemented Interfaces:
BotAuthenticator
- Direct Known Subclasses:
BotAuthenticatorCertImpl
,BotAuthenticatorRsaImpl
@API(status=INTERNAL)
public abstract class AbstractBotAuthenticator
extends Object
implements BotAuthenticator
Abstract class to factorize the
BotAuthenticator
logic between RSA and certificate,
especially the retry logic on top of HTTP calls.-
Field Summary
Modifier and TypeFieldDescriptionprotected final com.symphony.bdk.http.api.ApiClient
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractBotAuthenticator
(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig, com.symphony.bdk.core.config.model.BdkCommonJwtConfig commonJwtConfig, com.symphony.bdk.http.api.ApiClient loginApiClient) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Token
doRetrieveToken
(com.symphony.bdk.http.api.ApiClient client) Login API to retrieve a token is the same for KM and pod.protected abstract String
boolean
protected String
retrieveAuthorizationToken
(String sessionToken) protected abstract String
protected String
retrieveKeyManagerToken
(com.symphony.bdk.http.api.ApiClient client) protected abstract Token
protected Token
retrieveSessionToken
(com.symphony.bdk.http.api.ApiClient client) Methods 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.BotAuthenticator
authenticateBot
-
Field Details
-
loginApiClient
protected final com.symphony.bdk.http.api.ApiClient loginApiClient
-
-
Constructor Details
-
AbstractBotAuthenticator
protected AbstractBotAuthenticator(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig, @Nonnull com.symphony.bdk.core.config.model.BdkCommonJwtConfig commonJwtConfig, @Nonnull com.symphony.bdk.http.api.ApiClient loginApiClient)
-
-
Method Details
-
retrieveKeyManagerToken
- Throws:
AuthUnauthorizedException
-
retrieveKeyManagerToken
protected String retrieveKeyManagerToken(com.symphony.bdk.http.api.ApiClient client) throws AuthUnauthorizedException - Throws:
AuthUnauthorizedException
-
retrieveSessionToken
- Throws:
AuthUnauthorizedException
-
retrieveSessionToken
protected Token retrieveSessionToken(com.symphony.bdk.http.api.ApiClient client) throws AuthUnauthorizedException - Throws:
AuthUnauthorizedException
-
doRetrieveToken
protected abstract Token doRetrieveToken(com.symphony.bdk.http.api.ApiClient client) throws com.symphony.bdk.http.api.ApiException Login API to retrieve a token is the same for KM and pod.- Throws:
com.symphony.bdk.http.api.ApiException
-
retrieveAuthorizationToken
- Throws:
AuthUnauthorizedException
-
getBotUsername
-
isCommonJwtEnabled
public boolean isCommonJwtEnabled()
-