@Override
    public <T> T resolveJwtRequestParameter(final String jwtRequest, final RegisteredService registeredService,
                                            final String name, final Class<T> clazz) throws Exception {
        val jwt = jwtBuilder.unpack(Optional.ofNullable(registeredService), jwtRequest);
        if (clazz.isArray()) {
            return clazz.cast(jwt.getStringArrayClaim(name));
        }
        if (Collection.class.isAssignableFrom(clazz)) {
            return clazz.cast(jwt.getStringListClaim(name));
        }
        return clazz.cast(jwt.getStringClaim(name));
    }
This is {@link DefaultOAuth20RequestParameterResolver}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/DefaultOAuth20RequestParameterResolver.java