Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthError ¶
NewAuthError creates a new authentication error
Types ¶
type APIKeyAuth ¶
type APIKeyAuth struct {
APIKey string
}
APIKeyAuth implements API Key authentication (Opsgenie GenieKey)
func NewAPIKeyAuth ¶
func NewAPIKeyAuth(apiKey string) (*APIKeyAuth, error)
NewAPIKeyAuth creates a new API key authentication provider
func (*APIKeyAuth) Apply ¶
func (a *APIKeyAuth) Apply(req *http.Request) error
Apply adds GenieKey authentication header to the request
func (*APIKeyAuth) Mask ¶
func (a *APIKeyAuth) Mask() string
Mask returns a masked version of credentials for logging
type BasicAuth ¶
BasicAuth implements Basic Authentication (username + API token)
func NewBasicAuth ¶
NewBasicAuth creates a new basic authentication provider
type OAuthAuth ¶
OAuthAuth implements OAuth 2.0 Bearer token authentication This is a BYO (Bring Your Own) token implementation - users must provide their own access tokens
func NewOAuthAuth ¶
NewOAuthAuth creates a new OAuth authentication provider with a pre-existing access token Users must obtain the access token through their own OAuth flow or from Atlassian admin
type PATAuth ¶
type PATAuth struct {
Token string
}
PATAuth implements Personal Access Token authentication
func NewPATAuth ¶
NewPATAuth creates a new PAT authentication provider
type Provider ¶
type Provider interface {
// Apply adds authentication to an HTTP request
Apply(req *http.Request) error
// Type returns the authentication type
Type() string
// Mask returns a masked version of credentials for logging
Mask() string
}
Provider is the interface for authentication providers