Documentation ¶
Index ¶
- Constants
- Variables
- type CallbackArgs
- type External
- func (External) AutoRegister(*model.User) bool
- func (External) Callback(context.Context, *token.CallbackClaims, CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (External) Healthcheck() error
- func (e *External) Login(ctx context.Context, categoryID string, args LoginArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (External) String() string
- type Form
- func (f *Form) AutoRegister(u *model.User) bool
- func (f *Form) Callback(context.Context, *token.CallbackClaims, CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (f *Form) Healthcheck() error
- func (f *Form) Login(ctx context.Context, categoryID string, args LoginArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (f *Form) Providers() []string
- func (f *Form) String() string
- type Google
- func (Google) AutoRegister(*model.User) bool
- func (g *Google) Callback(ctx context.Context, claims *token.CallbackClaims, args CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (g *Google) Healthcheck() error
- func (g *Google) Login(ctx context.Context, categoryID string, args LoginArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (g *Google) String() string
- type HTTPRequestType
- type LDAP
- func (l *LDAP) AutoRegister(u *model.User) bool
- func (l *LDAP) Callback(context.Context, *token.CallbackClaims, CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (l *LDAP) Healthcheck() error
- func (l *LDAP) Login(ctx context.Context, categoryID string, args LoginArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (l *LDAP) String() string
- type Local
- func (Local) AutoRegister(*model.User) bool
- func (l *Local) Callback(context.Context, *token.CallbackClaims, CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (l *Local) Healthcheck() error
- func (l *Local) Login(ctx context.Context, categoryID string, args LoginArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (l *Local) String() string
- type LoginArgs
- type Provider
- type ProviderError
- type SAML
- func (s *SAML) AutoRegister(u *model.User) bool
- func (s *SAML) Callback(ctx context.Context, claims *token.CallbackClaims, args CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (s *SAML) Healthcheck() error
- func (s *SAML) Login(ctx context.Context, categoryID string, args LoginArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (SAML) String() string
- type Unknown
- func (Unknown) AutoRegister(*model.User) bool
- func (Unknown) Callback(context.Context, *token.CallbackClaims, CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (Unknown) Healthcheck() error
- func (Unknown) Login(context.Context, string, LoginArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
- func (Unknown) String() string
Constants ¶
View Source
const ( TokenArgsKey = "token" ProviderArgsKey = "provider" CategoryIDArgsKey = "category_id" RequestBodyArgsKey = "request_body" RedirectArgsKey = "redirect" FormUsernameArgsKey = "form_username" FormPasswordArgsKey = "form_password" HTTPRequest HTTPRequestType = "req" )
View Source
const ( ACSRoute = "/saml/acs" MetadataRoute = "/saml/metadata" SLORoute = "/saml/slo" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CallbackArgs ¶
type CallbackArgs struct {
Oauth2Code *string
}
type External ¶
type External struct {
// contains filtered or unexported fields
}
func (External) Callback ¶
func (External) Callback(context.Context, *token.CallbackClaims, CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
func (External) Healthcheck ¶
type Form ¶
type Form struct {
// contains filtered or unexported fields
}
func InitForm ¶
func InitForm(cfg cfg.Authentication, log *zerolog.Logger, db r.QueryExecutor) *Form
func (*Form) Callback ¶
func (f *Form) Callback(context.Context, *token.CallbackClaims, CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
func (*Form) Healthcheck ¶
type Google ¶
type Google struct {
// contains filtered or unexported fields
}
func InitGoogle ¶
func InitGoogle(cfg cfg.Authentication) *Google
func (*Google) Callback ¶
func (g *Google) Callback(ctx context.Context, claims *token.CallbackClaims, args CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
func (*Google) Healthcheck ¶
type HTTPRequestType ¶
type HTTPRequestType string
type LDAP ¶
type LDAP struct { ReUID *regexp.Regexp ReCategory *regexp.Regexp ReGroup *regexp.Regexp ReUsername *regexp.Regexp ReName *regexp.Regexp ReEmail *regexp.Regexp RePhoto *regexp.Regexp ReRole *regexp.Regexp // contains filtered or unexported fields }
func InitLDAP ¶
func InitLDAP(cfg cfg.AuthenticationLDAP, secret string, log *zerolog.Logger, db r.QueryExecutor) *LDAP
func (*LDAP) Callback ¶
func (l *LDAP) Callback(context.Context, *token.CallbackClaims, CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
func (*LDAP) Healthcheck ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
func InitLocal ¶
func InitLocal(db r.QueryExecutor) *Local
func (*Local) Callback ¶
func (l *Local) Callback(context.Context, *token.CallbackClaims, CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
func (*Local) Healthcheck ¶
type Provider ¶
type Provider interface { Login(ctx context.Context, categoryID string, args LoginArgs) (g *model.Group, u *types.ProviderUserData, redirect string, tkn string, err *ProviderError) Callback(ctx context.Context, claims *token.CallbackClaims, args CallbackArgs) (g *model.Group, u *types.ProviderUserData, redirect string, tkn string, err *ProviderError) AutoRegister(u *model.User) bool String() string Healthcheck() error }
type ProviderError ¶
type ProviderError struct { // The error that will be shown to the user User error // Detail of the error that will be logged in debug Detail error }
func (*ProviderError) Error ¶
func (p *ProviderError) Error() string
func (*ProviderError) Is ¶
func (p *ProviderError) Is(target error) bool
func (*ProviderError) Unwrap ¶
func (p *ProviderError) Unwrap() error
type SAML ¶
type SAML struct { Cfg cfg.Authentication Middleware *samlsp.Middleware ReUID *regexp.Regexp ReUsername *regexp.Regexp ReName *regexp.Regexp ReEmail *regexp.Regexp RePhoto *regexp.Regexp ReCategory *regexp.Regexp ReGroup *regexp.Regexp ReRole *regexp.Regexp // contains filtered or unexported fields }
func InitSAML ¶
func InitSAML(cfg cfg.Authentication, log *zerolog.Logger, db r.QueryExecutor) *SAML
func (*SAML) Callback ¶
func (s *SAML) Callback(ctx context.Context, claims *token.CallbackClaims, args CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
func (*SAML) Healthcheck ¶
type Unknown ¶
type Unknown struct{}
func (Unknown) Callback ¶
func (Unknown) Callback(context.Context, *token.CallbackClaims, CallbackArgs) (*model.Group, *types.ProviderUserData, string, string, *ProviderError)
func (Unknown) Healthcheck ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.