default boolean hasCredentialOfType(final Class<? extends Credential> type) {
        return getCredentials().stream().anyMatch(type::isInstance);
    }
Does this AuthenticationTransaction contain a credential of the given type?

@param type the credential type to check for
@return true if this AuthenticationTransaction contains a credential of the specified type
api/cas-server-core-api-authentication/src/main/java/org/apereo/cas/authentication/AuthenticationTransaction.java