Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcctByUsername ¶
type AcctByUsername struct {
UserAccount
}
func (AcctByUsername) GetMappingKey ¶
func (a AcctByUsername) GetMappingKey() string
func (AcctByUsername) GetMappingVal ¶
func (a AcctByUsername) GetMappingVal() *UserAccount
type EUAPrincipal ¶
type EUAPrincipal struct { EUAID string JobCodeEASi bool JobCodeGRT bool JobCodeTRBAdmin bool UserAccount *UserAccount }
EUAPrincipal represents information gleaned from the Okta JWT
func (*EUAPrincipal) Account ¶
func (p *EUAPrincipal) Account() *UserAccount
Account returns the UserAccount of an EUAPrincipal
func (*EUAPrincipal) AllowEASi ¶
func (p *EUAPrincipal) AllowEASi() bool
AllowEASi says whether this principal is authorized to operate within EASi
func (*EUAPrincipal) AllowGRT ¶
func (p *EUAPrincipal) AllowGRT() bool
AllowGRT says whether this principal is authorized to operate as part of the Review Team within EASi
func (*EUAPrincipal) AllowTRBAdmin ¶
func (p *EUAPrincipal) AllowTRBAdmin() bool
AllowTRBAdmin says whether this principal is authorized to operate as an admin of the TRB process within EASi
func (*EUAPrincipal) ID ¶
func (p *EUAPrincipal) ID() string
ID returns the EUA ID for the given Principal
func (*EUAPrincipal) String ¶
func (p *EUAPrincipal) String() string
String satisfies the fmt.Stringer interface
type EnhancedJwt ¶
type EnhancedJwt struct { JWT *jwtverifier.Jwt AuthToken string }
EnhancedJwt is the JWT and the auth token
func (*EnhancedJwt) GetOktaBaseURL ¶
func (ejwt *EnhancedJwt) GetOktaBaseURL() (*string, error)
GetOktaBaseURL returns the OktaBaseURL for the user in the context of the request and errors if the context doesn't have one
type GetUserAccountFromDBFunc ¶
GetUserAccountFromDBFunc defines a function that returns a user account from the database
type Principal ¶
type Principal interface { fmt.Stringer // ID returns the system identifier // for the given Principal ID() string // AllowEASi says whether this principal // is authorized to operate within EASi AllowEASi() bool // AllowGRT says whether this principal // is authorized to operate as part of // the Review Team within EASi AllowGRT() bool // AllowTRBAdmin says whether this principal // is authorized to operate as an admin of the TRB process within EASi AllowTRBAdmin() bool Account() *UserAccount }
Principal defines the expected behavior for an entity that is making requests of the system.
type UserAccount ¶
type UserAccount struct { ID uuid.UUID `json:"id" db:"id"` Username string `json:"username" db:"username"` CommonName string `json:"commonName" db:"common_name"` Locale string `json:"locale" db:"locale"` Email string `json:"email" db:"email"` GivenName string `json:"given_name" db:"given_name"` FamilyName string `json:"family_name" db:"family_name"` ZoneInfo string `json:"zoneinfo" db:"zone_info"` HasLoggedIn bool `json:"hasLoggedIn" db:"has_logged_in"` }
UserAccount represents a user from the database