MCPcopy Index your code
hub / github.com/appleboy/gin-jwt / initParams

Function initParams

_example/basic/server.go:81–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79}
80
81func initParams() *jwt.GinJWTMiddleware {
82 return &jwt.GinJWTMiddleware{
83 Realm: "test zone",
84 Key: []byte("secret key"),
85 Timeout: time.Hour,
86 MaxRefresh: time.Hour,
87 IdentityKey: identityKey,
88 PayloadFunc: payloadFunc(),
89
90 IdentityHandler: identityHandler(),
91 Authenticator: authenticator(),
92 Authorizer: authorizator(),
93 Unauthorized: unauthorized(),
94 LogoutResponse: logoutResponse(),
95 TokenLookup: "header: Authorization, query: token, cookie: jwt",
96 // TokenLookup: "query:token",
97 // TokenLookup: "cookie:token",
98 TokenHeadName: "Bearer",
99 TimeFunc: time.Now,
100 }
101}
102
103func payloadFunc() func(data any) gojwt.MapClaims {
104 return func(data any) gojwt.MapClaims {

Callers 1

mainFunction · 0.70

Calls 6

payloadFuncFunction · 0.70
identityHandlerFunction · 0.70
authenticatorFunction · 0.70
authorizatorFunction · 0.70
unauthorizedFunction · 0.70
logoutResponseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…