Java Code Examples for io.undertow.servlet.api.DeploymentInfo#getLoginConfig()

The following examples show how to use io.undertow.servlet.api.DeploymentInfo#getLoginConfig() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KeycloakServletExtension.java    From keycloak with Apache License 2.0 5 votes vote down vote up
public boolean isAuthenticationMechanismPresent(DeploymentInfo deploymentInfo, final String mechanismName) {
    LoginConfig loginConfig = deploymentInfo.getLoginConfig();
    if (loginConfig != null) {
        for (AuthMethodConfig method : loginConfig.getAuthMethods()) {
            if (method.getName().equalsIgnoreCase(mechanismName)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 2
Source File: KeycloakServletExtension.java    From keycloak with Apache License 2.0 5 votes vote down vote up
protected String getErrorPage(DeploymentInfo deploymentInfo) {
    LoginConfig loginConfig = deploymentInfo.getLoginConfig();
    String errorPage = null;
    if (loginConfig != null) {
        errorPage = loginConfig.getErrorPage();
    }
    return errorPage;
}
 
Example 3
Source File: SamlServletExtension.java    From keycloak with Apache License 2.0 5 votes vote down vote up
public boolean isAuthenticationMechanismPresent(DeploymentInfo deploymentInfo, final String mechanismName) {
    LoginConfig loginConfig = deploymentInfo.getLoginConfig();
    if (loginConfig != null) {
        for (AuthMethodConfig method : loginConfig.getAuthMethods()) {
            if (method.getName().equalsIgnoreCase(mechanismName)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 4
Source File: SamlServletExtension.java    From keycloak with Apache License 2.0 5 votes vote down vote up
protected String getErrorPage(DeploymentInfo deploymentInfo) {
    LoginConfig loginConfig = deploymentInfo.getLoginConfig();
    String errorPage = null;
    if (loginConfig != null) {
        errorPage = loginConfig.getErrorPage();
    }
    return errorPage;
}