Netflix Shiro Pull Demand #952

https stash.corp.netflix.com projects cme repos shiro pull-requests 952
https stash.corp.netflix.com projects cme repos shiro pull-requests 952

https://stash.corp.netflix.com/projects/CME/repos/shiro/pull-requests/952

This pull request brings support for typically the --max-age in addition to --max-stale flags to the shiro command.

The --max-age flag identifies the maximum era of a good symbol. If the token is elderly compared to the specified age, it will always be refreshed.

The --max-stale flag identifies typically the maximum stale age of the valid token. If the token is stagnant for more than the specified grow older, it will end up being refreshed.

These flags may be helpful with regard to controlling the regularity of token refreshes. For illustration, if you set typically the --max-age flag to 1 hour or so, the token will be refreshed every hour. If you set the --max-stale flag in order to 30 minutes, the particular token will become refreshed every 30 minutes.

To use these flags, merely add them to this shiro command word. For instance:

 shiro --max-age 1h --max-stale 30m 

This command will cause this shiro command to renew this token just about every hour or so, or if that is stale with regard to more than 30 minutes.

Benefits of using these flags

There are several benefits to using the --max-age and --max-stale flags:

  • Improved performance: Simply by managing the consistency involving token refreshes, an individual can enhance typically the performance of the application.
  • Reduced safety measures risks: By refreshing bridal party regularly, you can reduce the chance of your software being sacrificed simply by a taken or out of date token.
  • Easier supervision: By simply centralizing the management of token refreshes, you can create the idea easier in order to deal with your application's safety measures.

Conclusion

The --max-age and --max-stale flags are generally a valuable inclusion to the shiro command. That they allow you for you to control the consistency of token refreshes, which can increase performance, reduce safety measures risks, and help make management easier.