Documentation ¶
Index ¶
- func DelCookies(ctx echo.Context, names ...string)
- func IsAMachine(ac oidc.AccessClaims) bool
- func IsNotAMachine(ac oidc.AccessClaims) bool
- func NewTokenIntrospector(mode, selfCliID string, selfCliOnly bool, tokenRepo interface{}, ssoDB *sql.DB, ...) echo.MiddlewareFunc
- func SetCookie(ctx echo.Context, name, value string, duration time.Time)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAMachine ¶
func IsAMachine(ac oidc.AccessClaims) bool
IsAMachine return the reverse of IsNotAMachine function
func IsNotAMachine ¶
func IsNotAMachine(ac oidc.AccessClaims) bool
IsAMachine return true if the received claims correspond to a machine claims a machine authenticates itself as an sso client id using client_credentials so it checks if the subject equals the client to estimate it
func NewTokenIntrospector ¶
func NewTokenIntrospector( mode, selfCliID string, selfCliOnly bool, tokenRepo interface{}, ssoDB *sql.DB, redConn *redis.Client, ) echo.MiddlewareFunc
NewTokenIntrospector is a middleware used to declare than a route require authorization. The opaque token is found, instropected and information are set inside the current request context to be checked later by different actors (modules...) the way of retrieval, checks... of bearer tokens are defined by the given token repo
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.