@Override
    public boolean equals(final Object other) {
        if (this == other) {
            return true;
        }
        if (other instanceof Credential credential) {
            return Objects.equals(getId(), credential.getId());
        }
        return false;
    }
Gets credential metadata. Will initialize if metadata is null.

@return current credential metadata
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/credential/AbstractCredential.java