@Override
    protected AuthenticationHandlerExecutionResult doAuthentication(final Credential credential, final Service service) throws Throwable {
        val wsFederationCredentials = (WsFederationCredential) credential;
        if (wsFederationCredentials != null) {
            val attributes = wsFederationCredentials.getAttributes();
            val principal = principalFactory.createPrincipal(wsFederationCredentials.getId(), attributes);
            return this.createHandlerResult(wsFederationCredentials, principal, new ArrayList<>());
        }
        throw new FailedLoginException();
    }
This handler authenticates Security token/credentials.

@author John Gasper
@since 4.2.0
support/cas-server-support-wsfederation/src/main/java/org/apereo/cas/support/wsfederation/authentication/handler/support/WsFederationAuthenticationHandler.java