verifyoptions

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

verifyoptions 签名校验器校验方法的参数

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAUDMustHas

func WithAUDMustHas(auds ...string) optparams.Option[VerifyOptions]

WithAUDMustHas 校验token的aud中必须包含指定所有值

func WithAUDMustHasAny

func WithAUDMustHasAny(auds ...string) optparams.Option[VerifyOptions]

WithAUDMustHasAny 校验token的aud中必须包含指定值范围内的至少一个值

func WithAUDMustNotHas

func WithAUDMustNotHas(auds ...string) optparams.Option[VerifyOptions]

WithAUDMustNotHas 校验token的aud中必须不包含指定值范围内的所有值

func WithIssMustIn

func WithIssMustIn(isss ...string) optparams.Option[VerifyOptions]

WithIssMustIn 校验token的iss必须在指定范围内

func WithNotCheckRefreshTokenAUD

func WithNotCheckRefreshTokenAUD() optparams.Option[VerifyOptions]

WithNotCheckRefreshTokenAUD 设置不校验RefreshToken中的AUD必须和对应AccessToken的一致

func WithNotCheckRefreshTokenJTI

func WithNotCheckRefreshTokenJTI() optparams.Option[VerifyOptions]

WithNotCheckRefreshTokenJTI 设置不校验RefreshToken中的JTI必须和对应AccessToken的一致

func WithSUBMustBe

func WithSUBMustBe(sub string) optparams.Option[VerifyOptions]

WithSUBMustBe 校验用户是否与给定值匹配

Types

type VerifyOptions

type VerifyOptions struct {
	CheckMatchSUB           string   //校验token的sub是否符合这个字段填写的值
	CheckMatchALLAUD        []string // 校验token的aud是不是包含这个字段中指定的所有值
	CheckMatchAnyAUD        []string // 校验token的aud是不是包含这个字段中指定的至少一个值
	CheckNotMatchAUD        []string // 校验token的aud是不是不包含这个字段中指定的任何一个值
	CheckMatchISS           []string //校验token的签发人是否在这个字段给定的范围中
	NotCheckRefreshTokenAUD bool     //是否校验RefreshToken中的AUD必须和对应AccessToken的一致
	NotCheckRefreshTokenJTI bool     //是否校验RefreshToken中的JTI必须和对应AccessToken的一致
}

VerifyOptions 校验函数参数

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL