@Override
    public void populateAttributes(final AuthenticationBuilder builder, final AuthenticationTransaction transaction) {
        transaction.getPrimaryCredential().ifPresent(credential -> builder.mergeAttribute(Credential.CREDENTIAL_TYPE_ATTRIBUTE, credential.getClass().getSimpleName()));
    }
This is {@link AuthenticationCredentialTypeMetaDataPopulator}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/metadata/AuthenticationCredentialTypeMetaDataPopulator.java