@Override
    public Principal parse(final String authorizationHeader, final AuthorizationRequest authorizationRequest) throws Throwable {
        val claims = parseAuthorizationHeader(authorizationHeader);
        val principalAttributes = new HashMap(claims.getClaims());
        principalAttributes.put(HttpHeaders.AUTHORIZATION, authorizationHeader);
        if (authorizationRequest.getSubject() != null) {
            val credential = new BasicIdentifiableCredential(authorizationRequest.getSubject().getId());
            return authenticationSystemSupport.getPrincipalResolver().resolve(credential);
        }
        return PrincipalFactoryUtils.newPrincipalFactory().createPrincipal(claims.getSubject(), principalAttributes);
    }
This is {@link DefaultAuthorizationPrincipalParser}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-heimdall/src/main/java/org/apereo/cas/heimdall/engine/DefaultAuthorizationPrincipalParser.java