authnimpl

package
v11.1.4-modfix Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvideAuthnService

func ProvideAuthnService(s *Service) authn.Service

make sure service implements authn.Service interface

func ProvideIdentitySynchronizer

func ProvideIdentitySynchronizer(s *Service) authn.IdentitySynchronizer

make sure service implements authn.IdentitySynchronizer interface

Types

type Registration

type Registration struct{}

func ProvideRegistration

func ProvideRegistration(
	cfg *setting.Cfg, authnSvc authn.Service,
	orgService org.Service, sessionService auth.UserTokenService,
	accessControlService accesscontrol.Service,
	apikeyService apikey.Service, userService user.Service,
	jwtService auth.JWTVerifierService, userProtectionService login.UserProtectionService,
	loginAttempts loginattempt.Service, quotaService quota.Service,
	authInfoService login.AuthInfoService, renderService rendering.Service,
	features *featuremgmt.FeatureManager, oauthTokenService oauthtoken.OAuthTokenService,
	socialService social.Service, cache *remotecache.RemoteCache,
	ldapService service.LDAP, settingsProviderService setting.Provider,
) Registration

type Service

type Service struct {
	// contains filtered or unexported fields
}

func ProvideService

func ProvideService(
	cfg *setting.Cfg, tracer tracing.Tracer,
	sessionService auth.UserTokenService, usageStats usagestats.Service, registerer prometheus.Registerer,
) *Service

func (*Service) Authenticate

func (s *Service) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identity, error)

func (*Service) IsClientEnabled

func (s *Service) IsClientEnabled(name string) bool

func (*Service) Login

func (s *Service) Login(ctx context.Context, client string, r *authn.Request) (id *authn.Identity, err error)

func (*Service) Logout

func (s *Service) Logout(ctx context.Context, user authn.Requester, sessionToken *auth.UserToken) (*authn.Redirect, error)

func (*Service) RedirectURL

func (s *Service) RedirectURL(ctx context.Context, client string, r *authn.Request) (*authn.Redirect, error)

func (*Service) RegisterClient

func (s *Service) RegisterClient(c authn.Client)

func (*Service) RegisterPostAuthHook

func (s *Service) RegisterPostAuthHook(hook authn.PostAuthHookFn, priority uint)

func (*Service) RegisterPostLoginHook

func (s *Service) RegisterPostLoginHook(hook authn.PostLoginHookFn, priority uint)

func (*Service) RegisterPreLogoutHook

func (s *Service) RegisterPreLogoutHook(hook authn.PreLogoutHookFn, priority uint)

func (*Service) ResolveIdentity

func (s *Service) ResolveIdentity(ctx context.Context, orgID int64, namespaceID authn.NamespaceID) (*authn.Identity, error)

func (*Service) SyncIdentity

func (s *Service) SyncIdentity(ctx context.Context, identity *authn.Identity) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL