@Override
    public <T> T getSingleValuedAttribute(final String name, final Class<T> expectedType) {
        if (containsAttribute(name)) {
            val values = getAttributes().get(name);
            return values
                .stream()
                .filter(Objects::nonNull)
                .findFirst()
                .map(expectedType::cast)
                .orElse(null);
        }
        return null;
    }
Map of handler name to handler authentication failure cause.
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/DefaultAuthentication.java