Netflix Shiro Pull Demand #952
https://stash.corp.netflix.com/projects/CME/repos/shiro/pull-requests/952
This kind of pull request provides support for the particular --max-age and --max-stale flags to the shiro command.
The --max-age flag specifies the maximum age group of a good symbol. If the symbol is old as compared to the specified grow older, it will always be refreshed.
The --max-stale flag specifies typically the maximum stale era of a legitimate token. If typically the token is boring for more as compared to the specified era, it will become refreshed.
These flags may be beneficial intended for controlling the regularity of token refreshes. For instance, if you set the particular --max-age banner to 1 hour, the token may be refreshed every single hour. If you set the --max-stale flag for you to 30 minutes, this token will be refreshed just about every 35 minutes.
To use all these flags, merely put them to this shiro order. For instance:
shiro --max-age 1h --max-stale 30m This order will cause typically the shiro control to invigorate the token every single hour, or if that is stale with regard to more than 25 minutes.
Benefits of working with these flags
There will be several benefits to using the --max-age and --max-stale flags:
- Improved functionality: By means of handling the frequency of token refreshes, you can increase the performance of your current application.
- Reduced safety risks: By refreshing tokens regularly, you can reduce the chance of your app being jeopardized simply by a stolen or expired token.
- Easier managing: By means of centralizing the administration of token refreshes, you can help make that easier to manage your application's security.
Conclusion
The --max-age and --max-stale flags are the valuable inclusion to the shiro command. That they allow you to be able to control the consistency of token refreshes, which can increase performance, reduce protection risks, and help to make management easier.