- Introduced ForwardAuthConfig model to store global forward authentication settings. - Updated Manager to fetch and apply forward authentication configuration. - Added ForwardAuthHandler to create a reverse proxy handler for authentication. - Enhanced ProxyHost model to include forward authentication options. - Created Security page and ForwardAuthSettings component for managing authentication settings. - Implemented API endpoints for fetching and updating forward authentication configuration. - Added tests for new functionality including validation and error handling. - Updated frontend components to support forward authentication settings.
17 lines
683 B
Go
17 lines
683 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// ForwardAuthConfig represents the global forward authentication configuration.
|
|
// This is stored as structured data to avoid multiple Setting entries.
|
|
type ForwardAuthConfig struct {
|
|
ID uint `json:"id" gorm:"primaryKey"`
|
|
Provider string `json:"provider" gorm:"not null"` // "authelia", "authentik", "pomerium", "custom"
|
|
Address string `json:"address" gorm:"not null"` // e.g., "http://authelia:9091/api/verify"
|
|
TrustForwardHeader bool `json:"trust_forward_header" gorm:"default:true"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|