Skip to content

Add extra enhanced auth token to all APIs requests #790

Description

@yinan-symphony

Feature Request

The requested feature would be provide a way to inject an extra auth token to all API requests' header,
along with a way to automatically refresh the token when it s expired.

Description of Problem:

Symphony APIs requires the session token and key manager token to authenticate the requests.
in BDK, once the bot authenticates itself, the retrieved tokens are systematically added to all APIs requests.

However in case where all Symphony components are behind a gateway, Apigee for instance, there is no
way to inject the extra auth token to all API requests, in order to authenticate the requests against Apigee,
therefore requests are rejected.

Potential Solutions:

A new interface allowing bdk bot developer to retrieve the token, also determine the expiration of the token
based on the exception.

     public interface CustomEnhancedAuthAuthenticator {
          
        /**
         * Authenticates.
         *
         * @return the authentication session.
         */
        @Nonnull
        String authenticate() throws AuthUnauthorizedException;
      
        boolean isAuthTokenExpired(ApiException exception);
     }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions