Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitJWTValidator ¶
func InitJWTValidator(auth0Domain string, configBucket string, pemPath string, fs fileaccess.FileAccess) (*auth0.JWTValidator, error)
Types ¶
type IJWTReader ¶
type IJWTReader interface { GetValidator() JWTInterface GetUserInfo(*http.Request) (JWTUserInfo, error) }
IJWTReader - User ID getter from HTTP request
type JWTInterface ¶
type JWTInterface interface { ValidateRequest(r *http.Request) (*jwt.JSONWebToken, error) Claims(r *http.Request, token *jwt.JSONWebToken, values ...interface{}) error }
Implements a JWT validation and claim extraction interface
type JWTUserInfo ¶
type MockJWTValidator ¶
type MockJWTValidator struct { }
func (*MockJWTValidator) Claims ¶
func (v *MockJWTValidator) Claims(r *http.Request, token *jwt.JSONWebToken, values ...interface{}) error
func (*MockJWTValidator) ValidateRequest ¶
func (v *MockJWTValidator) ValidateRequest(r *http.Request) (*jwt.JSONWebToken, error)
type RealJWTReader ¶
type RealJWTReader struct {
Validator JWTInterface
}
RealJWTReader - Reader
func (RealJWTReader) GetSimpleUserInfo ¶
func (j RealJWTReader) GetSimpleUserInfo(r *http.Request) (JWTUserInfo, error)
GetSimpleUserInfo - Get Simple User Info
func (RealJWTReader) GetUserInfo ¶
func (j RealJWTReader) GetUserInfo(r *http.Request) (JWTUserInfo, error)
GetUserInfo - Get User Info
func (RealJWTReader) GetValidator ¶
func (j RealJWTReader) GetValidator() JWTInterface
Click to show internal directories.
Click to hide internal directories.