Documentation ¶
Index ¶
- type CallbackController
- type CallbackControllerInterface
- type DefaultLogoutRedirect
- type LegacyIdentifier
- func (identifier *LegacyIdentifier) Authenticate(ctx context.Context, request *web.Request) web.Result
- func (*LegacyIdentifier) Broker() string
- func (identifier *LegacyIdentifier) Callback(ctx context.Context, request *web.Request, ...) web.Result
- func (identifier *LegacyIdentifier) Identify(ctx context.Context, request *web.Request) (auth.Identity, error)
- func (identifier *LegacyIdentifier) Inject(authmanager *application.AuthManager, responder *web.Responder, ...) *LegacyIdentifier
- func (identifier *LegacyIdentifier) Logout(ctx context.Context, request *web.Request) *url.URL
- type LegacyIdentity
- func (identity *LegacyIdentity) AccessTokenClaims(into interface{}) error
- func (identity *LegacyIdentity) Broker() string
- func (identity *LegacyIdentity) IDToken() *oidc.IDToken
- func (identity *LegacyIdentity) IDTokenClaims(into interface{}) error
- func (identity *LegacyIdentity) Subject() string
- func (identity *LegacyIdentity) TokenSource() oauth2.TokenSource
- type LoginController
- type LoginControllerInterface
- type LoginGetParameterHook
- type LogoutController
- type LogoutControllerInterface
- type LogoutRedirectAware
- type UserController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackController ¶
type CallbackController struct {
// contains filtered or unexported fields
}
CallbackController handles the oauth2.0 callback
func (*CallbackController) Inject ¶
func (cc *CallbackController) Inject( responder *web.Responder, authManager *application.AuthManager, logger flamingo.Logger, eventPublisher *application.EventPublisher, userService application.UserServiceInterface, )
Inject CallbackController dependencies
type CallbackControllerInterface ¶
CallbackControllerInterface is the callback HTTP action provider
type DefaultLogoutRedirect ¶
type DefaultLogoutRedirect struct {
// contains filtered or unexported fields
}
DefaultLogoutRedirect helper
func (*DefaultLogoutRedirect) GetRedirectURL ¶
func (d *DefaultLogoutRedirect) GetRedirectURL(c context.Context, r *web.Request, u *url.URL) (*url.URL, error)
GetRedirectURL builds default redirect URL for logout
func (*DefaultLogoutRedirect) Inject ¶
func (d *DefaultLogoutRedirect) Inject(manager *application.AuthManager, router web.ReverseRouter)
Inject DefaultLogoutRedirect dependencies
type LegacyIdentifier ¶ added in v3.2.0
type LegacyIdentifier struct {
// contains filtered or unexported fields
}
LegacyIdentifier bridges core/oauth and core/auth/oauth together
func (*LegacyIdentifier) Authenticate ¶ added in v3.2.0
func (identifier *LegacyIdentifier) Authenticate(ctx context.Context, request *web.Request) web.Result
Authenticate an incoming request with the logincontroller
func (*LegacyIdentifier) Broker ¶ added in v3.2.0
func (*LegacyIdentifier) Broker() string
Broker hardcoded to flamingo.core.oauth
func (*LegacyIdentifier) Callback ¶ added in v3.2.0
func (identifier *LegacyIdentifier) Callback(ctx context.Context, request *web.Request, returnTo func(*web.Request) *url.URL) web.Result
Callback for the current request
func (*LegacyIdentifier) Identify ¶ added in v3.2.0
func (identifier *LegacyIdentifier) Identify(ctx context.Context, request *web.Request) (auth.Identity, error)
Identify an incoming request with the authmanager
func (*LegacyIdentifier) Inject ¶ added in v3.2.0
func (identifier *LegacyIdentifier) Inject( authmanager *application.AuthManager, responder *web.Responder, callbackController CallbackControllerInterface, loginController LoginControllerInterface, logoutController LogoutControllerInterface, ) *LegacyIdentifier
Inject dependencies
type LegacyIdentity ¶ added in v3.2.0
type LegacyIdentity struct {
// contains filtered or unexported fields
}
LegacyIdentity is an oauth.OIDCIdentifier for old oauth module
func (*LegacyIdentity) AccessTokenClaims ¶ added in v3.2.0
func (identity *LegacyIdentity) AccessTokenClaims(into interface{}) error
AccessTokenClaims is not supported with the old module
func (*LegacyIdentity) Broker ¶ added in v3.2.0
func (identity *LegacyIdentity) Broker() string
Broker code, hardcoded
func (*LegacyIdentity) IDToken ¶ added in v3.2.0
func (identity *LegacyIdentity) IDToken() *oidc.IDToken
IDToken getter
func (*LegacyIdentity) IDTokenClaims ¶ added in v3.2.0
func (identity *LegacyIdentity) IDTokenClaims(into interface{}) error
IDTokenClaims mapper
func (*LegacyIdentity) Subject ¶ added in v3.2.0
func (identity *LegacyIdentity) Subject() string
Subject for this identity
func (*LegacyIdentity) TokenSource ¶ added in v3.2.0
func (identity *LegacyIdentity) TokenSource() oauth2.TokenSource
TokenSource returns the oauth2 token source
type LoginController ¶
type LoginController struct {
// contains filtered or unexported fields
}
LoginController handles the login redirect
func (*LoginController) Inject ¶
func (l *LoginController) Inject( responder *web.Responder, authManager *application.AuthManager, ph []LoginGetParameterHook, router web.ReverseRouter, )
Inject LoginController dependencies
type LoginControllerInterface ¶
LoginControllerInterface is the callback HTTP action provider
type LoginGetParameterHook ¶
type LoginGetParameterHook interface {
Parameters(context.Context, *web.Request) map[string]string
}
LoginGetParameterHook helper to inject additional GET parameters for logins
type LogoutController ¶
type LogoutController struct {
// contains filtered or unexported fields
}
LogoutController handles the logout
func (*LogoutController) Inject ¶
func (l *LogoutController) Inject( responder *web.Responder, logger flamingo.Logger, authManager *application.AuthManager, eventPublisher *application.EventPublisher, logoutRedirect LogoutRedirectAware, router web.ReverseRouter, )
Inject LogoutController dependencies
type LogoutControllerInterface ¶
LogoutControllerInterface is the HTTP action provider implementation
type LogoutRedirectAware ¶
type LogoutRedirectAware interface {
GetRedirectURL(context context.Context, r *web.Request, u *url.URL) (*url.URL, error)
}
LogoutRedirectAware to retrieve redirect urls
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
UserController uc
func (*UserController) Data ¶
func (u *UserController) Data(c context.Context, r *web.Request, _ web.RequestParams) interface{}
Data controller to return userinfo
func (*UserController) Inject ¶
func (u *UserController) Inject(service application.UserServiceInterface)
Inject UserController dependencies