default Optional<Credential> getPrimaryCredential() {
        return getCredentials().stream().findFirst();
    }
Gets the first (primary) credential in the chain.

@return the credential
api/cas-server-core-api-authentication/src/main/java/org/apereo/cas/authentication/AuthenticationTransaction.java