Expiration date in the OAuth2 Module #14325
-
As seen on AJ Kauffmann's blogpost on S2S in AL, it's not possible to get the expiration date via the OAuth2 module. Is there a recommended way of getting the expiration date, because the only way I'm seeing around it, is by invoking the http call explicitly instead of using the system module, which kind of defeats the purpose of the module in that case, right? Is the expiration date to be added to OAuth2Impl? It didn't look like Dotnet ALAzureAdCodeGrantFlow had any helper function to retrieve the expiration date from the previous requests, so I guess it isn't stored/exposed anywhere? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I use AcquireTokenAndTokenCacheByAuthorizationCode to get token cache, then Base64Convert.FromBase64(TokenCache) to get nice json from cache and there you can find AccessToken with expiration time. |
Beta Was this translation helpful? Give feedback.
-
Maybe it is worthwhile making the retrieval of the expiration time more convenient? If it doesn't create any security concerns, we'd be up for a PR :-) |
Beta Was this translation helpful? Give feedback.
I use AcquireTokenAndTokenCacheByAuthorizationCode to get token cache, then Base64Convert.FromBase64(TokenCache) to get nice json from cache and there you can find AccessToken with expiration time.