Documentation
¶
Index ¶
- Constants
- func GenerateAgentJWT(signingKey *model.Key, source *model.Source) (string, error)
- func GenerateAgentJWTAndKey(source *model.Source) (*model.Key, string, error)
- func NewTokenContext(ctx context.Context, t any) context.Context
- type AgentAuthenticator
- type AgentJWT
- type Authenticator
- type NoneAuthenticator
- type RHSSOAuthenticator
- type User
Constants ¶
View Source
const ( RHSSOAuthentication string = "rhsso" LocalAuthentication string = "local" NoneAuthentication string = "none" )
View Source
const (
AgentTokenHeader = "X-Agent-Token"
)
Variables ¶
This section is empty.
Functions ¶
func GenerateAgentJWT ¶
func GenerateAgentJWTAndKey ¶
Types ¶
type AgentAuthenticator ¶
type AgentAuthenticator struct {
// contains filtered or unexported fields
}
func NewAgentAuthenticator ¶
func NewAgentAuthenticator(store store.Store) *AgentAuthenticator
func (*AgentAuthenticator) Authenticate ¶
func (aa *AgentAuthenticator) Authenticate(token string) (AgentJWT, error)
func (*AgentAuthenticator) Authenticator ¶
func (aa *AgentAuthenticator) Authenticator(next http.Handler) http.Handler
type AgentJWT ¶
type AgentJWT struct {
ExpireAt time.Time `json:"exp"`
IssueAt time.Time `json:"iat"`
Issuer string `json:"iss"`
OrgID string `json:"sub"`
SourceID string `json:"sourceID"`
}
func MustHaveAgent ¶
type Authenticator ¶
func NewAuthenticator ¶
func NewAuthenticator(authConfig config.Auth) (Authenticator, error)
type NoneAuthenticator ¶
type NoneAuthenticator struct{}
func NewNoneAuthenticator ¶
func NewNoneAuthenticator() (*NoneAuthenticator, error)
func (*NoneAuthenticator) Authenticator ¶
func (n *NoneAuthenticator) Authenticator(next http.Handler) http.Handler
type RHSSOAuthenticator ¶
type RHSSOAuthenticator struct {
// contains filtered or unexported fields
}
func NewRHSSOAuthenticator ¶
func NewRHSSOAuthenticator(ctx context.Context, jwkCertUrl string) (*RHSSOAuthenticator, error)
func (*RHSSOAuthenticator) Authenticate ¶
func (rh *RHSSOAuthenticator) Authenticate(token string) (User, error)
func (*RHSSOAuthenticator) Authenticator ¶
func (rh *RHSSOAuthenticator) Authenticator(next http.Handler) http.Handler
Click to show internal directories.
Click to hide internal directories.