openshift / openshift-restclient-java

Other
78 stars 112 forks source link

When authenticating, "expiresIn" is not set #463

Closed adietish closed 4 years ago

adietish commented 4 years ago

in https://github.com/openshift/openshift-restclient-java/issues/455#issuecomment-663590391 we discovered that IAuthenticationContext.getExpiresIn() always returns null and obviously isn't filled when authenticating. The response carries the value though:

Location: https://oauth-openshift.apps.dev.xxxxxxxxxxx/oauth/token/implicit#access_token=token-here-but-omitted&expires_in=7200&scope=user%3Afull&token_type=Bearer
adietish commented 4 years ago

The problem with this value is that it's a relative value: it defines the expiration in seconds since it was created.

https://docs.openshift.com/container-platform/3.7/architecture/additional_concepts/other_api_objects.html#oauthauthorizetoken

The expiresIn value is the expiration in seconds from the creationTimestamp.
adietish commented 4 years ago

PR was merged.

mhagnumdw commented 4 years ago

Tks!!