Get OAuth token string


#1

Matrix Version: 5.5.7.1

Hi all,
I’m playing around with an OAuth 2.0 Token asset, and as I understand it, this asset type is primarily for authentication for a REST Resource call. But is there any way to get the token itself? I’d like to be able to extract some claims from the access token which is a JWT.

The only keywords mentioned in the doco seem to relate specifically to OAuth Account Manager. I haven’t explored this yet since we don’t need federated access to Squiz.

I’ve tried creating a REST Resource asset as a kind of wrapper for the /token endpoint in order to intercept the response and pull out the token, but unfortunately my “REST Response Received” trigger only seems to fire when the REST asset is accessed directly and not when the OAuth 2.0 Token asset calls it.

Am I missing something simple, or has anyone got any ideas about how I might be able to achieve this?

Cheers
Alex


(Bart Banda) #2

There is no feature specifically that gives you this, but maybe you can intercept the GET/POST parameters somehow using an asset accessed trigger event and store them somehow in a cookie (using set cookie trigger action)? Not sure if that would even work or if there is anything you can do manually client-side…