Documentation
¶
Index ¶
- Variables
- type Enforcer
- type LocalEnforcer
- func (l *LocalEnforcer) CallbackHandler(c *echo.Context) error
- func (l *LocalEnforcer) RequireLogin(next echo.HandlerFunc) echo.HandlerFunc
- func (l *LocalEnforcer) SignInHandler(c *echo.Context) error
- func (l *LocalEnforcer) SignOutHandler(c *echo.Context) error
- func (l *LocalEnforcer) UserInfoHandler(c *echo.Context) error
- type OIDCClient
- func (o *OIDCClient) CallbackHandler(c *echo.Context) error
- func (o *OIDCClient) RequireLogin(next echo.HandlerFunc) echo.HandlerFunc
- func (o *OIDCClient) SignInHandler(c *echo.Context) error
- func (o *OIDCClient) SignOutHandler(c *echo.Context) error
- func (o *OIDCClient) UserInfoHandler(c *echo.Context) error
- func (o *OIDCClient) WithFirstUserBootstrap(bootstrap func(context.Context, string, identity.Actor) error)
- func (o *OIDCClient) WithUserRepository(repo outbound.UserRepository)
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type LocalEnforcer ¶
type LocalEnforcer struct {
UserInfo UserInfo
}
func NewLocalEnforcer ¶
func NewLocalEnforcer() *LocalEnforcer
func (*LocalEnforcer) CallbackHandler ¶
func (l *LocalEnforcer) CallbackHandler(c *echo.Context) error
func (*LocalEnforcer) RequireLogin ¶
func (l *LocalEnforcer) RequireLogin(next echo.HandlerFunc) echo.HandlerFunc
func (*LocalEnforcer) SignInHandler ¶
func (l *LocalEnforcer) SignInHandler(c *echo.Context) error
func (*LocalEnforcer) SignOutHandler ¶
func (l *LocalEnforcer) SignOutHandler(c *echo.Context) error
func (*LocalEnforcer) UserInfoHandler ¶
func (l *LocalEnforcer) UserInfoHandler(c *echo.Context) error
type OIDCClient ¶
type OIDCClient struct {
// contains filtered or unexported fields
}
func NewOIDC ¶
func NewOIDC(ctx context.Context, issuer, clientID, clientSecret, redirectURI, key string) (*OIDCClient, error)
NewOIDC returns a new OIDCClient
func (*OIDCClient) CallbackHandler ¶
func (o *OIDCClient) CallbackHandler(c *echo.Context) error
CallbackHandler handles the auth callback from route /oauth2/callback
func (*OIDCClient) RequireLogin ¶
func (o *OIDCClient) RequireLogin(next echo.HandlerFunc) echo.HandlerFunc
Middleware: require valid ID token with JWKS signature verification.
func (*OIDCClient) SignInHandler ¶
func (o *OIDCClient) SignInHandler(c *echo.Context) error
SignInHandler initiates the authentication /oauth2/sign_in
func (*OIDCClient) SignOutHandler ¶
func (o *OIDCClient) SignOutHandler(c *echo.Context) error
SignOutHandler handles the signout /oauth2/sign_out
func (*OIDCClient) UserInfoHandler ¶
func (o *OIDCClient) UserInfoHandler(c *echo.Context) error
UserInfoHandler retrieves user information from the ID token and returns it as JSON.
func (*OIDCClient) WithFirstUserBootstrap ¶
func (*OIDCClient) WithUserRepository ¶
func (o *OIDCClient) WithUserRepository(repo outbound.UserRepository)
WithUserRepository attaches a UserRepository so profiles are upserted on login.