finos / finos/symphony-bdk-java

Add extra enhanced auth token to all APIs requests

Open
#790 0 comments 0 reactions 1 assignee Claimed by @yinan-symphony View on GitHub
[type] enhancement
Dominant language
Java
Stars
29
Forks
77
Avg merge
1d 23h
Merged PRs (30d)
3

Description

## 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.

```java
public interface CustomEnhancedAuthAuthenticator {

/**
* Authenticates.
*
* @return the authentication session.
*/
@Nonnull
String authenticate() throws AuthUnauthorizedException;

boolean isAuthTokenExpired(ApiException exception);
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.