Title: Re: oauth token info
Hi Andrew Lau.
on Dienstag, 13. Juni 2017 at 12:14 was written:
|
Normal users can't query those endpoints |
That's true.
I think then the easiest way is to use
https://jwt.io/ or
https://github.com/auth0/jwt-decode
Regards
Aleks
|
On Tue, 13 Jun 2017 at 17:46 Aleksandar Lazic <[email protected]> wrote:
|
Hi Andrew Lau.
on Dienstag, 13. Juni 2017 at 03:38 was written:
|
Is there an endpoint to retrieve the current token information?
ie. /oapi/v1/users/~ seems to be an undocumented way to get the current user information. I'm looking to obtain the expiry time on the current token being used. |
Is the https://jwt.io/ not an option?
You can try this sequence
Search for the token if you don't know the token only the userName.
curl -k -v -H "Accept: application/json, */*" -H "User-Agent: oc/v3.4.1.18 (linux/amd64) openshift/0f9d380" -H "Authorization: Bearer ${AUTH_TOKEN}" "MASTER_URL/oapi/v1/oauthaccesstokens?pretty=true"
Get information about a token also expiresIn
curl -k -v -H "Accept: application/json, */*" -H "User-Agent: oc/v3.4.1.18 (linux/amd64) openshift/0f9d380" -H "Authorization: Bearer ${AUTH_TOKEN}" "MASTER_URL/oapi/v1/oauthaccesstokens/{metadata.name}?pretty=true"
I have found this in https://docs.openshift.org/latest/rest_api/openshift_v1.html at
GET /oapi/v1/oauthaccesstokens/{name}
Hth
--
Best Regards
Aleks |
|
--
Best Regards
Aleks
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users