wip
This commit is contained in:
16
mangezmieux-backend/internal/middleware/setup.go
Normal file
16
mangezmieux-backend/internal/middleware/setup.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"mangezmieux-backend/internal/injector"
|
||||
"mangezmieux-backend/internal/jwt"
|
||||
)
|
||||
|
||||
const AuthenticationMiddlewareKey = "AuthenticationMiddleware"
|
||||
const IntrospectServiceKey = "AuthCli"
|
||||
|
||||
func Setup(inj *injector.Injector) {
|
||||
|
||||
jwtService := injector.Get[*jwt.Service](inj, jwt.JWTKey)
|
||||
introspectService := injector.Get[IntrospectService](inj, IntrospectServiceKey)
|
||||
inj.Set(AuthenticationMiddlewareKey, GetAuthenticationMiddleware(introspectService, jwtService))
|
||||
}
|
||||
Reference in New Issue
Block a user