Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKeyCloakMiddleware ¶
func NewKeyCloakMiddleware(config KeyCloakConfig, options ...func(cloak *gocloak.GoCloak)) *keyCloakMiddleware
Types ¶
type KeyCloakConfig ¶
type KeyCloakConfig struct { KeyCloakIP string `mapstructure:"key_cloak_ip" json:"key_cloak_ip" yaml:"key_cloak_ip"` Realm string `mapstructure:"realm" json:"realm" yaml:"realm"` ClientID string `mapstructure:"client_id" json:"client_id" yaml:"client_id"` ClientSecret string `mapstructure:"client_secret" json:"client_secret" yaml:"client_secret"` RetrospectingToken bool `json:"retrospecting_token"` }
type Middleware ¶
type Middleware interface { GetClaim(ctx context.Context, accessToken string) (claim *jwt.MapClaims, err error) ResourceAccess(args ...string) (r keyCloakMiddleware) RealmAccess(args ...string) (r keyCloakMiddleware) GinGuard(hook ...GinHook) gin.HandlerFunc EchoGuard(hook ...EchoHook) echo.MiddlewareFunc ValidateRealmAccess(claims jwt.MapClaims) (err error) ValidateResourceAccess(claims jwt.MapClaims) error ReturnGoCloak() *gocloak.GoCloak }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.