symphony.bdk.core.auth.ext_app_authenticator.ExtensionAppAuthenticatorRsa#

class symphony.bdk.core.auth.ext_app_authenticator.ExtensionAppAuthenticatorRsa(authentication_api: symphony.bdk.gen.login_api.authentication_api.AuthenticationApi, pod_api: symphony.bdk.gen.pod_api.pod_api.PodApi, app_id: str, private_key_config: symphony.bdk.core.config.model.bdk_rsa_key_config.BdkRsaKeyConfig, retry_config: symphony.bdk.core.config.model.bdk_retry_config.BdkRetryConfig, tokens_repository: Optional[symphony.bdk.core.auth.tokens_repository.TokensRepository] = None)#

Bases: symphony.bdk.core.auth.ext_app_authenticator.ExtensionAppAuthenticator

A subclass of ExtensionAppAuthenticator specific to extension app RSA authentication.

__init__(authentication_api: symphony.bdk.gen.login_api.authentication_api.AuthenticationApi, pod_api: symphony.bdk.gen.pod_api.pod_api.PodApi, app_id: str, private_key_config: symphony.bdk.core.config.model.bdk_rsa_key_config.BdkRsaKeyConfig, retry_config: symphony.bdk.core.config.model.bdk_retry_config.BdkRetryConfig, tokens_repository: Optional[symphony.bdk.core.auth.tokens_repository.TokensRepository] = None)#
Parameters
  • authentication_api – the AuthenticationApi instance

  • pod_api – the PodApi instance

  • app_id – the application ID

  • private_key_config – the private key configuration of the extension app

  • retry_config – retry configuration

  • tokens_repository – the tokens repository to store existing valid sessions. Defaults to InMemoryTokensRepository

Methods

__init__(authentication_api, pod_api, ...[, ...])

param authentication_api

the AuthenticationApi instance

authenticate_and_retrieve_tokens(app_token)

Actually authenticates and retrieves the tokens.

authenticate_extension_app(app_token)

Authenticates an extension app.

is_token_pair_valid(app_token, symphony_token)

Validates if appToken and symphonyToken corresponds to an existing session.

validate_jwt(jwt)

Validates a jwt against the pod certificate.

async authenticate_and_retrieve_tokens(app_token: str) symphony.bdk.gen.login_model.extension_app_tokens.ExtensionAppTokens#

Actually authenticates and retrieves the tokens. Save the tokens in the tokens repository.

Parameters

app_token – the token generated by the application backend

Returns

the extension app tokens

async authenticate_extension_app(app_token: str) symphony.bdk.core.auth.auth_session.AppAuthSession#

Authenticates an extension app.

Parameters

app_token – the token generated by the application backend

Returns

the extension app authentication session

async is_token_pair_valid(app_token: str, symphony_token: str) bool#

Validates if appToken and symphonyToken corresponds to an existing session.

Parameters
  • app_token – the application token

  • symphony_token – the Symphony token

Returns

True if token pair is valid, False otherwise

async validate_jwt(jwt: str) dict#

Validates a jwt against the pod certificate.

Parameters

jwt – the jwt to be validated

Returns

the dictionary of jwt claims

Raises

AuthInitializationError – If the pod certificate or jwt are invalid.