package org.synyx.urlaubsverwaltung.security.oidc;

import org.hibernate.validator.constraints.URL;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotEmpty;

/**
 * @author Florian Krupicka - krupicka@synyx.de
 */
@Validated
@ConfigurationProperties("uv.security.oidc")
public class OidcSecurityProperties {

    /**
     * The OpenId Connect issuer URI (e.g. your OIDC server).
     */
    @URL
    private String issuerUri;

    /**
     * OIDC client identifier to authenticate the UV application against your OIDC authentication server.
     */
    @NotEmpty
    private String clientId;

    /**
     * OIDC client secret to authenticate the UV application against your OIDC authentication server.
     */
    @NotEmpty
    private String clientSecret;

    @NotEmpty
    private String logoutPath;

    public String getIssuerUri() {
        return issuerUri;
    }

    public void setIssuerUri(String issuerUri) {
        this.issuerUri = issuerUri;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getClientSecret() {
        return clientSecret;
    }

    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
    }

    public String getLogoutPath() {
        return logoutPath;
    }

    public void setLogoutPath(String logoutPath) {
        this.logoutPath = logoutPath;
    }
}

@@ -878,16 +878,503 @@
 ecret;%0A%0A
+    /**%0A     * The path after the given %7B@link OidcSecurityProperties#issuerUri%7D where the logout is defined%0A     * for the used provider.%0A     *%0A     * %3Cp%3Ee.g. for %3Ci%3Ekeycloak%3C/i%3E this would be %3Cpre%3E'/protocol/openid-connect/logout'%3Cpre%3E%0A     * because the logout is defined at 'https://$provider/auth/realms/$realm/protocol/openid-connect/logout'%0A     * and the %7B@link OidcSecurityProperties#issuerUri%7D should be defined with 'https://$provider/auth/realms/$realm'%0A     * %3C/p%3E%0A     */%0A
     @Not

Add javadoc for oidc logouthPath