mirror of
https://github.com/swissmakers/fail2ban-ui.git
synced 2026-04-11 13:47:05 +02:00
fix PocketID logout url
This commit is contained in:
@@ -721,6 +721,7 @@ OIDC_ISSUER_URL=https://pocket-id.example.com
|
|||||||
OIDC_CLIENT_ID=fail2ban-ui-client
|
OIDC_CLIENT_ID=fail2ban-ui-client
|
||||||
OIDC_CLIENT_SECRET=your-secret
|
OIDC_CLIENT_SECRET=your-secret
|
||||||
OIDC_REDIRECT_URL=https://fail2ban-ui.example.com/auth/callback
|
OIDC_REDIRECT_URL=https://fail2ban-ui.example.com/auth/callback
|
||||||
|
# OIDC_LOGOUT_URL is optional - automatically constructed if not set
|
||||||
```
|
```
|
||||||
|
|
||||||
**Security Notes:**
|
**Security Notes:**
|
||||||
|
|||||||
@@ -94,11 +94,14 @@ services:
|
|||||||
# The claim to use as the username (e.g., email, preferred_username, sub)
|
# The claim to use as the username (e.g., email, preferred_username, sub)
|
||||||
# - OIDC_USERNAME_CLAIM=preferred_username
|
# - OIDC_USERNAME_CLAIM=preferred_username
|
||||||
# Optional: Provider logout URL
|
# Optional: Provider logout URL
|
||||||
# If not set, the logout URL will be auto-constructed using the standard OIDC logout endpoint: {issuer}/protocol/openid-connect/logout
|
# If not set, the logout URL will be auto-constructed based on the provider:
|
||||||
|
# Keycloak: {issuer}/protocol/openid-connect/logout
|
||||||
|
# Authentik: {issuer}/protocol/openid-connect/logout
|
||||||
|
# Pocket-ID: {issuer}/api/oidc/end-session
|
||||||
# Examples:
|
# Examples:
|
||||||
# Keycloak: https://keycloak.example.com/realms/your-realm/protocol/openid-connect/logout
|
# Keycloak: https://keycloak.example.com/realms/your-realm/protocol/openid-connect/logout
|
||||||
# Authentik: https://authentik.example.com/application/o/your-client-slug/protocol/openid-connect/logout
|
# Authentik: https://authentik.example.com/application/o/your-client-slug/protocol/openid-connect/logout
|
||||||
# Pocket-ID: https://pocket-id.example.com/protocol/openid-connect/logout
|
# Pocket-ID: https://pocket-id.example.com/api/oidc/end-session
|
||||||
# - OIDC_LOGOUT_URL=https://keycloak.example.com/realms/your-realm/protocol/openid-connect/logout
|
# - OIDC_LOGOUT_URL=https://keycloak.example.com/realms/your-realm/protocol/openid-connect/logout
|
||||||
# Optional: Skip login page and redirect directly to OIDC provider (default: false)
|
# Optional: Skip login page and redirect directly to OIDC provider (default: false)
|
||||||
# When set to true, users are immediately redirected to the OIDC provider without showing the login page
|
# When set to true, users are immediately redirected to the OIDC provider without showing the login page
|
||||||
|
|||||||
@@ -75,11 +75,14 @@ services:
|
|||||||
# The claim to use as the username (e.g., email, preferred_username, sub)
|
# The claim to use as the username (e.g., email, preferred_username, sub)
|
||||||
# - OIDC_USERNAME_CLAIM=preferred_username
|
# - OIDC_USERNAME_CLAIM=preferred_username
|
||||||
# Optional: Provider logout URL
|
# Optional: Provider logout URL
|
||||||
# If not set, the logout URL will be auto-constructed using the standard OIDC logout endpoint: {issuer}/protocol/openid-connect/logout
|
# If not set, the logout URL will be auto-constructed based on the provider:
|
||||||
|
# Keycloak: {issuer}/protocol/openid-connect/logout
|
||||||
|
# Authentik: {issuer}/protocol/openid-connect/logout
|
||||||
|
# Pocket-ID: {issuer}/api/oidc/end-session
|
||||||
# Examples:
|
# Examples:
|
||||||
# Keycloak: https://keycloak.example.com/realms/your-realm/protocol/openid-connect/logout
|
# Keycloak: https://keycloak.example.com/realms/your-realm/protocol/openid-connect/logout
|
||||||
# Authentik: https://authentik.example.com/application/o/your-client-slug/protocol/openid-connect/logout
|
# Authentik: https://authentik.example.com/application/o/your-client-slug/protocol/openid-connect/logout
|
||||||
# Pocket-ID: https://pocket-id.example.com/protocol/openid-connect/logout
|
# Pocket-ID: https://pocket-id.example.com/api/oidc/end-session
|
||||||
# - OIDC_LOGOUT_URL=https://keycloak.example.com/realms/your-realm/protocol/openid-connect/logout
|
# - OIDC_LOGOUT_URL=https://keycloak.example.com/realms/your-realm/protocol/openid-connect/logout
|
||||||
# Optional: Skip login page and redirect directly to OIDC provider (default: false)
|
# Optional: Skip login page and redirect directly to OIDC provider (default: false)
|
||||||
# When set to true, users are immediately redirected to the OIDC provider without showing the login page
|
# When set to true, users are immediately redirected to the OIDC provider without showing the login page
|
||||||
|
|||||||
@@ -3221,8 +3221,12 @@ func LogoutHandler(c *gin.Context) {
|
|||||||
// Keycloak requires client_id when using post_logout_redirect_uri
|
// Keycloak requires client_id when using post_logout_redirect_uri
|
||||||
// Format: {issuer}/protocol/openid-connect/logout?post_logout_redirect_uri={redirect}&client_id={client_id}
|
// Format: {issuer}/protocol/openid-connect/logout?post_logout_redirect_uri={redirect}&client_id={client_id}
|
||||||
logoutURL = fmt.Sprintf("%s/protocol/openid-connect/logout?post_logout_redirect_uri=%s&client_id=%s", issuerURL, redirectURIEncoded, clientIDEncoded)
|
logoutURL = fmt.Sprintf("%s/protocol/openid-connect/logout?post_logout_redirect_uri=%s&client_id=%s", issuerURL, redirectURIEncoded, clientIDEncoded)
|
||||||
case "authentik", "pocketid":
|
case "pocketid":
|
||||||
// Standard OIDC format for Authentik and Pocket-ID
|
// Pocket-ID uses a different logout endpoint
|
||||||
|
// Format: {issuer}/api/oidc/end-session?redirect_uri={redirect}
|
||||||
|
logoutURL = fmt.Sprintf("%s/api/oidc/end-session?redirect_uri=%s", issuerURL, redirectURIEncoded)
|
||||||
|
case "authentik":
|
||||||
|
// Standard OIDC format for Authentik
|
||||||
// Format: {issuer}/protocol/openid-connect/logout?redirect_uri={redirect}
|
// Format: {issuer}/protocol/openid-connect/logout?redirect_uri={redirect}
|
||||||
logoutURL = fmt.Sprintf("%s/protocol/openid-connect/logout?redirect_uri=%s", issuerURL, redirectURIEncoded)
|
logoutURL = fmt.Sprintf("%s/protocol/openid-connect/logout?redirect_uri=%s", issuerURL, redirectURIEncoded)
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user