All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tkit.quarkus.rs.context.principal.RestContextPrincipalConfig Maven / Gradle / Ivy

There is a newer version: 2.36.0
Show newest version
package org.tkit.quarkus.rs.context.principal;

import java.util.Optional;

import io.quarkus.runtime.annotations.StaticInitSafe;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithDefault;
import io.smallrye.config.WithName;

@StaticInitSafe
@ConfigMapping(prefix = "tkit.rs.context.principal")
public interface RestContextPrincipalConfig {

    @WithName("name")
    PrincipalName name();

    interface PrincipalName {

        @WithName("enabled")
        @WithDefault("true")
        boolean enabled();

        @WithName("custom-service-enabled")
        @WithDefault("false")
        boolean enabledCustomService();

        @WithName("security-context")
        SecurityContextConfig securityContext();

        @WithName("default")
        Optional defaultPrincipal();

        @WithName("token-enabled")
        @WithDefault("true")
        boolean tokenEnabled();

        @WithName("token-claim-name")
        @WithDefault("sub")
        String tokenClaimName();

        @WithName("header-param-enabled")
        @WithDefault("false")
        boolean headerParamEnabled();

        @WithName("header-param-name")
        @WithDefault("x-principal-id")
        String headerParamName();
    }

    interface SecurityContextConfig {
        @WithName("enabled")
        @WithDefault("false")
        boolean enabled();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy