@Override
    @Nonnull
    public List<Credential> extract(final RequestContext requestContext) {
        val credential = WebUtils.getCredential(requestContext);
        if (credential instanceof final AbstractCredential ac) {
            if (ac.getCredentialMetadata() == null) {
                ac.setCredentialMetadata(new BasicCredentialMetadata(credential));
            }
            val credentialMetadata = Objects.requireNonNull(credential).getCredentialMetadata();
            credentialMetadata.setTenant(tenantExtractor.extract(requestContext).map(TenantDefinition::getId).orElse(null));
        }
        return CollectionUtils.wrapList(credential);
    }
This is {@link DefaultCasWebflowCredentialProvider}.

@author Misagh Moayyed
@since 7.0.0
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/authentication/DefaultCasWebflowCredentialProvider.java