jwt

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Resources = []*biz.Resource{
	{
		Keyword:     "AdminJwt",
		Description: "后台管理服务jwt配置信息",
		Fields:      "Secret,Expire,Renewal,Whitelist",
		Private:     proto.Bool(false),
		Tag:         "jwt",
		ResourceValue: []*biz.ResourceValue{
			{
				EnvID: env.TEST,
				Value: util.MarshalString(map[string]any{
					"Secret":  "limes-cloud-test",
					"Expire":  "2h",
					"Renewal": "120s",
					"Whitelist": map[string]bool{
						"GET:/manager/v1/setting":                 true,
						"POST:/manager/v1/login/captcha":          true,
						"POST:/manager/v1/login":                  true,
						"POST:/manager/v1/token/refresh":          true,
						"GET:/manager/client/v1/dict/value":       true,
						"POST:/resource/client/v1/upload/prepare": true,
						"POST:/resource/client/v1/upload":         true,
					},
				}),
			},
			{
				EnvID: env.PRE,
				Value: util.MarshalString(map[string]any{
					"Secret":  "limes-cloud-pre",
					"Expire":  "2h",
					"Renewal": "120s",
					"Whitelist": map[string]bool{
						"GET:/manager/v1/setting":                 true,
						"POST:/manager/v1/login/captcha":          true,
						"POST:/manager/v1/login":                  true,
						"POST:/manager/v1/token/refresh":          true,
						"GET:/manager/client/v1/dict/value":       true,
						"POST:/resource/client/v1/upload/prepare": true,
						"POST:/resource/client/v1/upload":         true,
					},
				}),
			},
			{
				EnvID: env.PROD,
				Value: util.MarshalString(map[string]any{
					"Secret":  "limes-cloud-prod",
					"Expire":  "2h",
					"Renewal": "120s",
					"Whitelist": map[string]bool{
						"GET:/manager/v1/setting":                 true,
						"POST:/manager/v1/login/captcha":          true,
						"POST:/manager/v1/login":                  true,
						"POST:/manager/v1/token/refresh":          true,
						"GET:/manager/client/v1/dict/value":       true,
						"POST:/resource/client/v1/upload/prepare": true,
						"POST:/resource/client/v1/upload":         true,
					},
				}),
			},
		},
	},

	{
		Keyword:     "ClientJwt",
		Description: "客户端服务jwt配置信息",
		Fields:      "Secret,Expire,Renewal,Whitelist",
		Private:     proto.Bool(false),
		Tag:         "jwt",
		ResourceValue: []*biz.ResourceValue{
			{
				EnvID: env.TEST,
				Value: util.MarshalString(map[string]any{
					"Secret":  "limes-cloud-client-test",
					"Expire":  "2h",
					"Renewal": "360s",
					"Whitelist": map[string]bool{
						"*:/user-center/admin/*":                 true,
						"*:/user-center/client/v1/*":             true,
						"POST:/user-center/client/token/refresh": true,
					},
				}),
			},
			{
				EnvID: env.PRE,
				Value: util.MarshalString(map[string]any{
					"Secret":  "limes-cloud-client-pre",
					"Expire":  "2h",
					"Renewal": "360s",
					"Whitelist": map[string]bool{
						"*:/user-center/admin/*":                 true,
						"*:/user-center/client/v1/*":             true,
						"POST:/user-center/client/token/refresh": true,
					},
				}),
			},
			{
				EnvID: env.PROD,
				Value: util.MarshalString(map[string]any{
					"Secret":  "limes-cloud-client-prod",
					"Expire":  "2h",
					"Renewal": "360s",
					"Whitelist": map[string]bool{
						"*:/user-center/admin/*":                 true,
						"*:/user-center/client/v1/*":             true,
						"POST:/user-center/client/token/refresh": true,
					},
				}),
			},
		},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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