mirror of
https://github.com/swissmakers/fail2ban-ui.git
synced 2026-04-17 05:53:15 +02:00
Implement additional env variable to hide loginpage if desired
This commit is contained in:
@@ -141,6 +141,14 @@ func IsEnabled() bool {
|
||||
return oidcClient != nil && oidcClient.Config != nil && oidcClient.Config.Enabled
|
||||
}
|
||||
|
||||
// GetConfig returns the OIDC configuration
|
||||
func GetConfig() *config.OIDCConfig {
|
||||
if oidcClient == nil {
|
||||
return nil
|
||||
}
|
||||
return oidcClient.Config
|
||||
}
|
||||
|
||||
// GetAuthURL generates the authorization URL for OIDC login
|
||||
func (c *OIDCClient) GetAuthURL(state string) string {
|
||||
return c.OAuth2Config.AuthCodeURL(state, oauth2.AccessTypeOffline)
|
||||
|
||||
Reference in New Issue
Block a user