By: Ramkumar Chandrasekaran user 28 Jun 2017 at 11:21 p.m. CDT

3 Responses
Ramkumar Chandrasekaran gravatar
We have enabled SCIM API testmode=true and able to get the oAuth token from admin portal after 10 minutes. The oAuth access token is only working for 2 or 3 hours and it expires. We have done same configuration in another environment using SCIM test mode with same version on Gluu, in which the token duration is more than 3 weeks and it is not expiring. Please let us know whether any configuration is missing. Thanks Ramkumar.C

By Jose Gonzalez staff 01 Jul 2017 at 7:22 a.m. CDT

Jose Gonzalez gravatar
Dear Ramkumar, To start investigating, can you please clarify when you say "..able to get the oAuth token from admin portal after 10 minutes"? What is that time frame related to?

By Ramkumar Chandrasekaran user 05 Jul 2017 at 3:09 p.m. CDT

Ramkumar Chandrasekaran gravatar
We understood that the testmode token is working based on oxAuth - longtokenlifetime value configuration from Admin portal. So we are using this to keep the token for longer duration. Thanks Ramkumar.C

By Jose Gonzalez staff 10 Jul 2017 at 9:45 a.m. CDT

Jose Gonzalez gravatar
Hi Ramkumar, Once you are in oxTrust (admin web GUI), and do what you already know to enable test mode, i.e. *Configuration > JSON Configuration* and choosing true under "*scimTestMode*"; a new entry under "*oxtrust client*" is added to your LDAP similar to this one: ``` dn: uniqueIdentifier=..., oxAuthGrantId= ... ,inum=<oxTrust Admin client ID>,ou=clients,o=<organization ID>,o=gluu oxAuthClientId: <oxTrust Admin client ID> oxAuthCreation: <NOW> oxAuthExpiration: <NOW + 1 Year> oxAuthGrantId: ... oxAuthGrantType: client_credentials uniqueIdentifier: ... oxAuthScope: openid user_name profile email oxAuthTokenCode: {sha256Hex}<access token> oxAuthTokenType: access_token objectClass: top objectClass: oxAuthToken ``` Please try inspect and see if the attribute `oxAuthExpiration` effectively has the expiration date set to one year in the future (or whatever time you have set in `longLivedAccessTokenLifetime` - the latter is measured in seconds) and let us know. The `oxAuthTokenCode` attribute contains the result of applying SHA256 to your access token. You can see the token in the oxTrust admin GUI, of course.