-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable APIML token renewal before expiration #1966
Comments
Thank you for raising this enhancement request. |
Just a note there is API available via API ML for this type of exchange - https://docs.zowe.org/stable/user-guide/api-mediation/api-mediation-jwt-token-refresh/ It's not enabled by default, but I wanted to let you know, in case this is something you want to use, but it may be better to use the Personal Access Tokens for the authentication against the API Mediation Layer. |
Here is a bit more information about the APIs we could write in a non-breaking enhancement to the Imperative framework. Thanks to the APIML Token structure, we could split it into 3 portions.
The API may look something like this. export class CliUtils {
// ...
public static getTokenExpirationTime(apimlToken: string): string {
// This is just pseudo-code : )
const tokenDetails = JSON.parse(base64Decode(apimlToken.split(".")[1]));
return tokenDetails.exp;
} |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. |
I think this is still something we should consider, even if only to avoid passing an expired token to the API ML. |
Is your feature or enhancement request related to a problem or limitation? Please describe
When an APIML token expires, a REST request fails and the user is directed to login again.
Describe your enhancement idea
Detect that the token is due to (or has already) expired, and automatically perform an APIML login request. Then continue the user's original request.
Describe alternatives you've considered
Provide any additional context
The text was updated successfully, but these errors were encountered: