Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring security OAuth2 - how to disable access token expiry?

I have requirement where in client makes API calls using the access token. Generating access token is one time job and I will be providing the access token to the client.I believe, the spring security has a expiry on the access token on expiry of which need to pass the request token to get a new access token. Is there a way to disable the expiry of access token, which enables the API access with single access token always?

like image 643
pavan Avatar asked Mar 18 '23 03:03

pavan


1 Answers

According to the API docs, you can set a zero or negative value for the access token validity if you don't want the token to expire.

Note that this will be overridden if you have set a specific value for the client.

like image 181
Shaun the Sheep Avatar answered Apr 06 '23 12:04

Shaun the Sheep