on 07-01-2019 8:03 AM
Hi All,
I tried following all the steps in the blog whose URL is mentioned below.
While I am getting the authentication token and the entire flow is running properly, I just cannot change the value of expires_in which is 43199 by default.
How do I change that to some other value, let's say 5 minutes (300 seconds) ?
Hello souvik_majumder ,
The value of expires_in can be controlled via configuration of the XSUAA instance:
When you create the instance of XSUAA service, you pass a couple of parameters in JSON format, right? Here you can add one parameter for the oauth configuration, which in turn contains one parameter for the validity of the access token (and also for the refresh token):
"oauth2-configuration": {
"token-validity": 7200
}
I've described it a bit here:
https://blogs.sap.com/2019/05/09/sap-cloud-platform-backend-service-tutorial-15-security-using-autho...
and the reference of the parameters of XSUAA configuration can be found in the SAP Help Portal
Hope this answers your question,
Kind Regards,
Carlos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Carlos,
It worked for me. I did add the parameter in the xs-security.json file. The only mistake I did, is that I didn't mention the xs-security.json path in the cf update command. It should be like the one below.
cf update-service <uaa_instance_name> -c <json_file | inline-JSON object>
Eg:
cf update-service my-xsuaa -c xs-security.json
The command should be run from the path where the above json file is present.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.