SpoonX / aurelia-authentication

Authentication plugin for aurelia.
http://aurelia-authentication.spoonx.org
MIT License
90 stars 60 forks source link

Token Payload and Id Token #372

Closed wpearson4 closed 6 years ago

wpearson4 commented 6 years ago

My authorization provider returns an access token with audience for api access and an identity token for user attributes which get display at the client. The getTokenPayload() call is hard-coded to get the token payload from the access token. I noticed when looking at the object in local storage it has an idtokenpayload object. Is there a way to override getTokenPayload to use id token instead of the access token

RWOverdijk commented 6 years ago

If it's hardcoded, no. But adding a config option would be a viable option. Or a getPayload altogether, which is essentially the same as reading local storage.

A PR would be appreciated. If you do end up submitting one, please don't forget the docs.