Netflix Shiro Pull Demand #952
https://stash.corp.netflix.com/projects/CME/repos/shiro/pull-requests/952
This kind of pull request adds support for this --max-age and --max-stale flags to the shiro command.
The --max-age flag specifies the maximum age of a legitimate token. If the token is older compared to the specified age, it will always be refreshed.
The --max-stale flag specifies the particular maximum stale era of the appropriate token. If this token is boring for more when compared with the specified age group, it will end up being refreshed.
These flags can easily be valuable intended for controlling the consistency of token refreshes. For illustration, when you set typically the --max-age flag to 1 hour or so, the token will be refreshed every single hour. If anyone set the --max-stale flag for you to 30 minutes, this token will become refreshed just about every 35 minutes.
To use these types of flags, simply increase them to this shiro command word. For illustration:
shiro --max-age 1h --max-stale 30m This control will cause the particular shiro control to renew the particular token every single hour or so, or if that is stale intended for more than 30 minutes.
Benefits of making use of these flags
There will be several benefits for you to using the --max-age and --max-stale flags:
- Improved functionality: By means of managing the rate of recurrence associated with token refreshes, an individual can enhance this performance of the application.
- Reduced safety risks: By refreshing tokens regularly, you can reduce the threat of your application being affected by a lost or ended token.
- Easier management: By simply centralizing the managing of token refreshes, you can help to make the idea easier to handle your application's security.
Conclusion
The --max-age and --max-stale flags are really the valuable improvement to the shiro command. They allow you for you to control the consistency of token refreshes, which can boost performance, reduce safety measures risks, and create management easier.