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 particular pull request gives support for this --max-age plus --max-stale flags to the shiro command.

The --max-age flag identifies the maximum age group of a valid expression. If the token is old compared to the specified era, it will end up being refreshed.

The --max-stale flag identifies the particular maximum stale era of the legitimate token. If the token is stagnant for more than the specified era, it will end up being refreshed.

These flags could be helpful intended for controlling the consistency of token refreshes. For example of this, when you set the particular --max-age flag to 1 hr, the token can be refreshed every hour. If anyone set the --max-stale flag for you to 30 minutes, the token will end up being refreshed every thirty minutes.

To use these kinds of flags, basically include them to the shiro order. For example of this:

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

This control will cause the particular shiro order to refresh the token every hr, or if this is stale regarding more than 35 minutes.

Benefits of using these flags

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

  • Improved functionality: By maintaining the frequency regarding token refreshes, you can boost this performance of the application.
  • Reduced protection risks: By refreshing bridal party regularly, you can reduce the danger of your software being affected by simply a lost or ended token.
  • Easier management: By simply centralizing the supervision of token refreshes, you can create that easier for you to handle your application's safety measures.

Conclusion

The --max-age and --max-stale flags are generally a new valuable add-on to the shiro command. They will allow you in order to control the regularity of token refreshes, which can enhance performance, reduce security risks, and create management easier.