Re: UAA: How to set client_credentials token grant type to not expire


Filip Hanik
 

public static final intMAX_VALUE
<http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#MAX_VALUE>
2147483647
that's the largest value you can set. However, I just realized, that if
you set this value, the UAA will get an overflow and the int will become
negative.


so set the value to

315 569 260


that's a 10 year expiration. the computer that retrieved that token won't
be around in 10 years so it's a safe number.

On Friday, July 24, 2015, Kayode Odeyemi <dreyemi(a)gmail.com> wrote:

Thanks Filip.

However, everytime I set that (for example, I set it to 2542838400), I get
this:

"The request sent by the client was syntactically incorrect."

That's December 31st 2050 when decoded. Is it possible that, that number
is too large?

On Thu, Jul 23, 2015 at 7:09 PM, Filip Hanik <fhanik(a)pivotal.io
<javascript:_e(%7B%7D,'cvml','fhanik(a)pivotal.io');>> wrote:



https://github.com/cloudfoundry/uaa/blob/master/docs/UAA-APIs.rst#register-client-post-oauthclients

access_token_validity - int Optional Value in seconds for how long an
access token is valid for

Set this field to a very large value, like
http://docs.oracle.com/javase/7/docs/api/constant-values.html#java.lang.Integer.MAX_VALUE

On Thu, Jul 23, 2015 at 11:05 AM, Kayode Odeyemi <dreyemi(a)gmail.com
<javascript:_e(%7B%7D,'cvml','dreyemi(a)gmail.com');>> wrote:

Hi,

I have some trusted clients set up to use client_credentials token
grant. I'll like to set their tokens not to expire.

How do I achieve this?


_______________________________________________
cf-dev mailing list
cf-dev(a)lists.cloudfoundry.org
<javascript:_e(%7B%7D,'cvml','cf-dev(a)lists.cloudfoundry.org');>
https://lists.cloudfoundry.org/mailman/listinfo/cf-dev

_______________________________________________
cf-dev mailing list
cf-dev(a)lists.cloudfoundry.org
<javascript:_e(%7B%7D,'cvml','cf-dev(a)lists.cloudfoundry.org');>
https://lists.cloudfoundry.org/mailman/listinfo/cf-dev

Join {cf-dev@lists.cloudfoundry.org to automatically receive all group messages.