Documentation ¶
Index ¶
Constants ¶
View Source
const ServiceName = "AuthService"
Variables ¶
View Source
var ErrFailedToParsePemFile = errors.New("failed to parse pem-encoded file")
View Source
var ErrJWTSetURLMustHaveHTTPSScheme = errors.New("jwt_set_url must have https scheme")
View Source
var ErrKeySetConfigurationAmbiguous = errors.New("key set configuration is ambiguous: you should set either key_file, jwk_set_file or jwk_set_url")
View Source
var ErrKeySetIsNotConfigured = errors.New("key set for jwt verification is not configured")
Functions ¶
func HasSubClaim ¶
HasSubClaim checks if the provided JWT token contains a non-empty "sub" claim. Returns true if it contains, otherwise returns false.
Types ¶
type AuthService ¶
type AuthService struct { Cfg *setting.Cfg RemoteCache *remotecache.RemoteCache // contains filtered or unexported fields }
func ProvideService ¶
func ProvideService(cfg *setting.Cfg, remoteCache *remotecache.RemoteCache) (*AuthService, error)
type FakeJWTService ¶
func NewFakeJWTService ¶
func NewFakeJWTService() *FakeJWTService
Click to show internal directories.
Click to hide internal directories.