config

package
v0.0.0-...-6819526 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CiphertextConfig

type CiphertextConfig struct {
	IsCiphertext bool   `mapstructure:"isCiphertext"` // 密码字段是否启用密文传输
	CipherKey    string `mapstructure:"cipherKey"`    // 支持 8 16 24 bit
}

type Config

type Config struct {
	Ciphertext CiphertextConfig `mapstructure:"ciphertext"`
	Jwt        JwtConfig        `mapstructure:"jwt"`
}

type JwtConfig

type JwtConfig struct {
	Secret              string `mapstructure:"secret"`              // jwt secret
	Issuer              string `mapstructure:"issuer"`              // jwt issuer
	AccessTokenExpired  string `mapstructure:"accessTokenExpired"`  // jwt access token expired
	RefreshTokenExpired string `mapstructure:"refreshTokenExpired"` // jwt refresh token expired
	// 分布式共享token
	CacheKeyPrefix string `mapstructure:"cacheKeyPrefix"` // jwt cache key prefix
}

func (*JwtConfig) GetAccessTokenExpired

func (c *JwtConfig) GetAccessTokenExpired() time.Duration

func (*JwtConfig) GetRefreshTokenExpired

func (c *JwtConfig) GetRefreshTokenExpired() time.Duration

func (*JwtConfig) Validate

func (c *JwtConfig) Validate() []error

Jump to

Keyboard shortcuts

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