private Pair<String, Map> getKeyAndMap(final RequestContext requestContext) {
        switch (aupProperties.getInMemory().getScope()) {
            case GLOBAL -> {
                val principal = WebUtils.getAuthentication(requestContext).getPrincipal();
                return Pair.of(principal.getId(), policyMap);
            }
            default -> {
                return Pair.of(AUP_ACCEPTED, requestContext.getFlowScope().asMap());
            }
        }
    }
This is {@link DefaultAcceptableUsagePolicyRepository}.

@author Misagh Moayyed
@since 4.2
support/cas-server-support-aup-core/src/main/java/org/apereo/cas/aup/DefaultAcceptableUsagePolicyRepository.java