Documentation ¶
Overview ¶
signoptions 签名器签名方法的参数
Index ¶
- Variables
- func AddAud(aud string) optparams.Option[SignOptions]
- func WillEffectiveAfter(nbftime time.Duration) optparams.Option[SignOptions]
- func WillEffectiveOn(nbf time.Time) optparams.Option[SignOptions]
- func WithAud(aud ...string) optparams.Option[SignOptions]
- func WithExpAt(exp time.Time) optparams.Option[SignOptions]
- func WithJTI(jti string) optparams.Option[SignOptions]
- func WithNbf(nbf int64) optparams.Option[SignOptions]
- func WithRefreshExpAt(exp time.Time) optparams.Option[SignOptions]
- func WithRefreshTTL(ttl time.Duration) optparams.Option[SignOptions]
- func WithSub(sub string) optparams.Option[SignOptions]
- func WithTTL(ttl time.Duration) optparams.Option[SignOptions]
- type SignOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSignOptions = SignOptions{}
Functions ¶
func AddAud ¶
func AddAud(aud string) optparams.Option[SignOptions]
AddAud 设置接收jwt的一方标识,即访问权限的所有方,比如`b.com`
func WillEffectiveAfter ¶
func WillEffectiveAfter(nbftime time.Duration) optparams.Option[SignOptions]
WillEffectiveAfter 设置jwt开始时间,从调用时间起过多久开始生效
func WillEffectiveOn ¶
func WillEffectiveOn(nbf time.Time) optparams.Option[SignOptions]
WillEffectiveOn 设置jwt的生效开始时间
func WithAud ¶
func WithAud(aud ...string) optparams.Option[SignOptions]
WithAud 设置接收jwt的一方标识,即访问权限的所有方,比如`b.com`
func WithExpAt ¶
func WithExpAt(exp time.Time) optparams.Option[SignOptions]
WithExpAt 设置jwt的有效期截止时间
func WithJTI ¶
func WithJTI(jti string) optparams.Option[SignOptions]
WithJTI 设置jwt的jti,不设置则会使用默认生成器创建
func WithRefreshExpAt ¶
func WithRefreshExpAt(exp time.Time) optparams.Option[SignOptions]
WithRefreshExpAt 设置jwt的伴生refreshtoken有效期截止时间
func WithRefreshTTL ¶
func WithRefreshTTL(ttl time.Duration) optparams.Option[SignOptions]
WithRefreshTTL 设置jwt的伴生refreshtoken的生命周期
Types ¶
Click to show internal directories.
Click to hide internal directories.