Documentation
¶
Index ¶
- type AuthConfig
- type AuthManager
- func (am *AuthManager) CreateAuthMessage(tokenString string) (map[string]interface{}, error)
- func (am *AuthManager) ExtractSubject(token *jwt.Token) (string, error)
- func (am *AuthManager) GetTokenFromHeader(header string) (string, error)
- func (am *AuthManager) ValidateToken(tokenString string) (*jwt.Token, error)
- type JWK
- type JWKS
- type KeycloakConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
Type string `json:"type"`
Secret string `json:"secret"`
Keycloak *KeycloakConfig `json:"keycloak,omitempty"`
}
AuthConfig contains authentication configuration
type AuthManager ¶
type AuthManager struct {
// contains filtered or unexported fields
}
AuthManager handles authentication with relay server
func NewAuthManager ¶
func NewAuthManager(config *AuthConfig) (*AuthManager, error)
NewAuthManager creates a new authentication manager
func (*AuthManager) CreateAuthMessage ¶
func (am *AuthManager) CreateAuthMessage(tokenString string) (map[string]interface{}, error)
CreateAuthMessage creates an authentication message for relay server
func (*AuthManager) ExtractSubject ¶
func (am *AuthManager) ExtractSubject(token *jwt.Token) (string, error)
ExtractSubject extracts subject from token
func (*AuthManager) GetTokenFromHeader ¶
func (am *AuthManager) GetTokenFromHeader(header string) (string, error)
GetTokenFromHeader extracts token from Authorization header
func (*AuthManager) ValidateToken ¶
func (am *AuthManager) ValidateToken(tokenString string) (*jwt.Token, error)
ValidateToken validates a JWT token
Click to show internal directories.
Click to hide internal directories.