You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.
In the use case I need to revoke a token after retrieving it from an instance of StormpathAccessTokenAuthenticator, I am forced to make a superfluous calls to client.getAccount, and account.getAccessTokens in order to call accessToken.delete();
e.g.
constclient=newstormpath.Client(options);constauthenticator=newstormpath.StormpathAccessTokenAuthenticator(client);(...)// 1.) Validate tokenauthenticator.authenticate(jwtString,(err,accessTokenResponse)=>{// Even though I have the href, `accessTokenResponse.delete()` is not a function; instead...// 2.) get accountclient.getAccount(accessTokenResponse.account.href,(err,account)=>{// 3.) get access token resourcesaccount.getAccessTokens(null,(err,collection)=>{// 4.) logout by revoking tokencollection[0].delete((err)=>console.log('Finally Logged out after 4 API calls'));});});});
The only place that actually instantiates an AccessToken resource is in Account.getAccessTokens, therefore even though I have the href and the token object, I am required to incur an additional API call before I can issue the DELETE request. This makes the one request to logout in my application require 4 api calls.
The text was updated successfully, but these errors were encountered:
In the use case I need to revoke a token after retrieving it from an instance of
StormpathAccessTokenAuthenticator
, I am forced to make a superfluous calls toclient.getAccount
, andaccount.getAccessTokens
in order to callaccessToken.delete()
;e.g.
The only place that actually instantiates an AccessToken resource is in
Account.getAccessTokens
, therefore even though I have the href and the token object, I am required to incur an additional API call before I can issue the DELETE request. This makes the one request to logout in my application require 4 api calls.The text was updated successfully, but these errors were encountered: