@Override
    public CredentialMetadata getCredentialMetadata() {
        if (credentialMetadata == null) {
            this.credentialMetadata = new BasicCredentialMetadata(this);
        }
        return this.credentialMetadata;
    }
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