verifyoptions

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VerifyOption

type VerifyOption interface {
	Apply(*VerifyOptions)
}

func WithAUDMustHas

func WithAUDMustHas(auds ...string) VerifyOption

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

func WithAUDMustHasAny added in v0.0.4

func WithAUDMustHasAny(auds ...string) VerifyOption

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

func WithAUDMustNotHas added in v0.0.4

func WithAUDMustNotHas(auds ...string) VerifyOption

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

func WithIssMustIn

func WithIssMustIn(isss ...string) VerifyOption

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

func WithNotCheckRefreshTokenAUD

func WithNotCheckRefreshTokenAUD() VerifyOption

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

func WithNotCheckRefreshTokenJTI

func WithNotCheckRefreshTokenJTI() VerifyOption

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

func WithSUBMustBe

func WithSUBMustBe(sub string) VerifyOption

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

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