clients

package
v0.0.0-testrgm6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: AGPL-3.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey

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

func ProvideAPIKey

func ProvideAPIKey(apiKeyService apikey.Service, userService user.Service) *APIKey

func (*APIKey) Authenticate

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

func (*APIKey) Hook

func (s *APIKey) Hook(ctx context.Context, identity *authn.Identity, r *authn.Request) error

func (*APIKey) Name

func (s *APIKey) Name() string

func (*APIKey) Priority

func (s *APIKey) Priority() uint

func (*APIKey) Test

func (s *APIKey) Test(ctx context.Context, r *authn.Request) bool

type Anonymous

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

func ProvideAnonymous

func ProvideAnonymous(cfg *setting.Cfg, orgService org.Service, anonSessionService anonymous.Service) *Anonymous

func (*Anonymous) Authenticate

func (a *Anonymous) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identity, error)

func (*Anonymous) Name

func (a *Anonymous) Name() string

func (*Anonymous) Priority

func (a *Anonymous) Priority() uint

func (*Anonymous) Test

func (a *Anonymous) Test(ctx context.Context, r *authn.Request) bool

func (*Anonymous) UsageStatFn

func (a *Anonymous) UsageStatFn(ctx context.Context) (map[string]interface{}, error)

type Basic

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

func ProvideBasic

func ProvideBasic(client authn.PasswordClient) *Basic

func (*Basic) Authenticate

func (c *Basic) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identity, error)

func (*Basic) Name

func (c *Basic) Name() string

func (*Basic) Priority

func (c *Basic) Priority() uint

func (*Basic) String

func (c *Basic) String() string

func (*Basic) Test

func (c *Basic) Test(ctx context.Context, r *authn.Request) bool

type ExtendedJWT

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

func ProvideExtendedJWT

func ProvideExtendedJWT(userService user.Service, cfg *setting.Cfg, signingKeys signingkeys.Service, oauthServer oauthserver.OAuth2Server) *ExtendedJWT

func (*ExtendedJWT) Authenticate

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

func (*ExtendedJWT) Name

func (s *ExtendedJWT) Name() string

func (*ExtendedJWT) Priority

func (s *ExtendedJWT) Priority() uint

func (*ExtendedJWT) Test

func (s *ExtendedJWT) Test(ctx context.Context, r *authn.Request) bool

type ExtendedJWTClaims

type ExtendedJWTClaims struct {
	jwt.Claims
	ClientID     string              `json:"client_id"`
	Groups       []string            `json:"groups"`
	Email        string              `json:"email"`
	Name         string              `json:"name"`
	Login        string              `json:"login"`
	Scopes       []string            `json:"scope"`
	Entitlements map[string][]string `json:"entitlements"`
}

type Form

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

func ProvideForm

func ProvideForm(client authn.PasswordClient) *Form

func (*Form) Authenticate

func (c *Form) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identity, error)

func (*Form) Name

func (c *Form) Name() string

type Grafana

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

func ProvideGrafana

func ProvideGrafana(cfg *setting.Cfg, userService user.Service) *Grafana

func (*Grafana) AuthenticatePassword

func (c *Grafana) AuthenticatePassword(ctx context.Context, r *authn.Request, username, password string) (*authn.Identity, error)

func (*Grafana) AuthenticateProxy

func (c *Grafana) AuthenticateProxy(ctx context.Context, r *authn.Request, username string, additional map[string]string) (*authn.Identity, error)

func (*Grafana) String

func (c *Grafana) String() string

type JWT

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

func ProvideJWT

func ProvideJWT(jwtService auth.JWTVerifierService, cfg *setting.Cfg) *JWT

func (*JWT) Authenticate

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

func (*JWT) Name

func (s *JWT) Name() string

func (*JWT) Priority

func (s *JWT) Priority() uint

func (*JWT) Test

func (s *JWT) Test(ctx context.Context, r *authn.Request) bool

type LDAP

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

func ProvideLDAP

func ProvideLDAP(cfg *setting.Cfg, ldapService ldapService) *LDAP

func (*LDAP) AuthenticatePassword

func (c *LDAP) AuthenticatePassword(ctx context.Context, r *authn.Request, username, password string) (*authn.Identity, error)

func (*LDAP) AuthenticateProxy

func (c *LDAP) AuthenticateProxy(ctx context.Context, r *authn.Request, username string, _ map[string]string) (*authn.Identity, error)

func (*LDAP) String

func (c *LDAP) String() string

type OAuth

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

func ProvideOAuth

func ProvideOAuth(
	name string, cfg *setting.Cfg, oauthCfg *social.OAuthInfo,
	connector social.SocialConnector, httpClient *http.Client,
) *OAuth

func (*OAuth) Authenticate

func (c *OAuth) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identity, error)

func (*OAuth) Name

func (c *OAuth) Name() string

func (*OAuth) RedirectURL

func (c *OAuth) RedirectURL(ctx context.Context, r *authn.Request) (*authn.Redirect, error)

type Password

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

func ProvidePassword

func ProvidePassword(loginAttempts loginattempt.Service, clients ...authn.PasswordClient) *Password

func (*Password) AuthenticatePassword

func (c *Password) AuthenticatePassword(ctx context.Context, r *authn.Request, username, password string) (*authn.Identity, error)

type Proxy

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

func ProvideProxy

func ProvideProxy(cfg *setting.Cfg, cache proxyCache, userSrv user.Service, clients ...authn.ProxyClient) (*Proxy, error)

func (*Proxy) Authenticate

func (c *Proxy) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identity, error)

func (*Proxy) Hook

func (c *Proxy) Hook(ctx context.Context, identity *authn.Identity, r *authn.Request) error

func (*Proxy) Name

func (c *Proxy) Name() string

func (*Proxy) Priority

func (c *Proxy) Priority() uint

func (*Proxy) Test

func (c *Proxy) Test(ctx context.Context, r *authn.Request) bool

type Render

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

func ProvideRender

func ProvideRender(userService user.Service, renderService rendering.Service) *Render

func (*Render) Authenticate

func (c *Render) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identity, error)

func (*Render) Name

func (c *Render) Name() string

func (*Render) Priority

func (c *Render) Priority() uint

func (*Render) Test

func (c *Render) Test(ctx context.Context, r *authn.Request) bool

type Session

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

func ProvideSession

func ProvideSession(cfg *setting.Cfg, sessionService auth.UserTokenService, features *featuremgmt.FeatureManager) *Session

func (*Session) Authenticate

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

func (*Session) Hook

func (s *Session) Hook(ctx context.Context, identity *authn.Identity, r *authn.Request) error

func (*Session) Name

func (s *Session) Name() string

func (*Session) Priority

func (s *Session) Priority() uint

func (*Session) Test

func (s *Session) Test(ctx context.Context, r *authn.Request) bool

Jump to

Keyboard shortcuts

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