Documentation ¶
Index ¶
Constants ¶
const ( JobCodeTestUser = "MINT_USER_NONPROD" JobCodeTestAssessment = "MINT_ASSESSMENT_NONPROD" JobCodeTestMACUser = "MINT MAC Users" JobCodeTestMINTContractor = "MINT_CTR_FFS_NONPROD" JobCodeTestNonCMSUser = "MINT_NON_CMS_NONPROD" JobCodeProdUser = "MINT_USER" JobCodeProdAssessment = "MINT_ASSESSMENT" JobCodeProdMACUser = "MINT MAC Users" JobCodeProdMINTContractor = "MINT_CONTRACTOR_FFS" JobCodeProdNonCMSUser = "MINT_NON_CMS" )
These job codes define the environmentally specific potential codes which a user may possess
Variables ¶
This section is empty.
Functions ¶
func NewJwtVerifier ¶
func NewJwtVerifier(clientID string, issuer string) *jwtverifier.JwtVerifier
NewJwtVerifier returns a new JWT verifier with some minimal config
Types ¶
type JobCodesConfig ¶
type JobCodesConfig struct {
// contains filtered or unexported fields
}
JobCodesConfig contains a set of environment context-sensitive job codes
func NewJobCodesConfig ¶
func NewJobCodesConfig( user string, assessment string, macUser string, mintContractor string, nonCMSUser string, ) *JobCodesConfig
NewJobCodesConfig is a constructor to generate a JobCodesConfig
func NewProductionJobCodesConfig ¶
func NewProductionJobCodesConfig() *JobCodesConfig
NewProductionJobCodesConfig generates a JobCodesConfig for the production environment
func NewTestJobCodesConfig ¶
func NewTestJobCodesConfig() *JobCodesConfig
NewTestJobCodesConfig generates a JobCodesConfig for the test environment
func (*JobCodesConfig) GetAssessmentJobCode ¶
func (j *JobCodesConfig) GetAssessmentJobCode() string
GetAssessmentJobCode returns this JobCodesConfig's assessment job code
func (*JobCodesConfig) GetMACUserJobCode ¶
func (j *JobCodesConfig) GetMACUserJobCode() string
GetMACUserJobCode returns this JobCodesConfig's MAC user job code
func (*JobCodesConfig) GetMINTContractorJobCode ¶
func (j *JobCodesConfig) GetMINTContractorJobCode() string
GetMINTContractorJobCode returns this JobCodesConfig's MINT Contractor job code
func (*JobCodesConfig) GetMINTNonCMSJobCode ¶
func (j *JobCodesConfig) GetMINTNonCMSJobCode() string
GetNonCMSJobCode returns this JobCodesConfig's MINT Non-CMS User job code
func (*JobCodesConfig) GetUserJobCode ¶
func (j *JobCodesConfig) GetUserJobCode() string
GetUserJobCode returns this JobCodesConfig's user job code
type JwtVerifier ¶
type JwtVerifier interface {
VerifyAccessToken(jwt string) (*jwtverifier.Jwt, error)
}
JwtVerifier collects the methods we call on a JWT verifier
type MiddlewareFactory ¶
type MiddlewareFactory struct { handlers.HandlerBase Store *storage.Store // contains filtered or unexported fields }
MiddlewareFactory provides functionality to create functions that attach EUA Principals to context objects by decoding JWT tokens
func NewMiddlewareFactory ¶
func NewMiddlewareFactory( base handlers.HandlerBase, jwtVerifier JwtVerifier, store *storage.Store, useTestJobCodes bool, ldClient *ld.LDClient, ) *MiddlewareFactory
NewMiddlewareFactory returns a factory creating Okta middleware functions
func (MiddlewareFactory) NewAuthenticationMiddleware ¶
func (f MiddlewareFactory) NewAuthenticationMiddleware(next http.Handler) http.Handler
NewAuthenticationMiddleware returns an authentication middleware function to parse a JWT and attach an appropriate principal object to the context
func (MiddlewareFactory) NewOktaWebSocketAuthenticationMiddleware ¶
func (f MiddlewareFactory) NewOktaWebSocketAuthenticationMiddleware() transport.WebsocketInitFunc
NewOktaWebSocketAuthenticationMiddleware returns a transport.WebsocketInitFunc that uses the `authToken` in the websocket connection payload to authenticate an Okta user.