@GetMapping(OAuth20Constants.BASE_OAUTH20_URL + '/' + OAuth20Constants.UMA_CLAIMS_COLLECTION_URL)
    @Operation(
        summary = "Collect claims",
        description = "Collects claims and redirects to the client application",
        parameters = {
            @Parameter(name = "client_id", required = true, description = "Client ID"),
            @Parameter(name = "redirect_uri", required = true, description = "Redirect URI"),
            @Parameter(name = "ticket", required = true, description = "Ticket ID"),
            @Parameter(name = "state", required = false, description = "State")
        }
    )
    public View getClaims(@RequestParam("client_id") final String clientId,
                          @RequestParam("redirect_uri") final String redirectUri,
                          @RequestParam("ticket") final String ticketId,
                          @RequestParam(value = "state", required = false) final String state,
                          final HttpServletRequest request, final HttpServletResponse response) throws Exception {

        val profileResult = getAuthenticatedProfile(request, response, OAuth20Constants.UMA_PROTECTION_SCOPE);

        val service = OAuth20Utils.getRegisteredOAuthServiceByClientId(getUmaConfigurationContext().getServicesManager(), clientId);
        RegisteredServiceAccessStrategyUtils.ensureServiceAccessIsAllowed(service);

        val ticketRegistry = getUmaConfigurationContext().getTicketRegistry();
        val ticket = ticketRegistry.getTicket(ticketId, UmaPermissionTicket.class);
        if (ticket == null || ticket.isExpired()) {
            throw new InvalidTicketException(ticketId);
        }

        ticket.getClaims().putAll(profileResult.getAttributes());
        ticketRegistry.updateTicket(ticket);

        if (StringUtils.isBlank(redirectUri) || !service.matches(redirectUri)) {
            throw UnauthorizedServiceException.denied("Redirect URI is unauthorized for this service definition");
        }

        val template = UriComponentsBuilder.fromUriString(redirectUri);
        template.queryParam(OAuth20Constants.AUTHORIZATION_STATE, OAuth20Constants.CLAIMS_SUBMITTED);
        if (StringUtils.isNotBlank(state)) {
            template.queryParam(OAuth20Constants.STATE, state);
        }

        val redirectTo = template.toUriString();
        return new RedirectView(redirectTo);
    }
Gets claims.

@param clientId    the client id
@param redirectUri the redirect uri
@param ticketId    the ticket id
@param state       the state
@param request     the request
@param response    the response
@return redirect view
@throws Exception the exception
support/cas-server-support-oauth-uma-core/src/main/java/org/apereo/cas/uma/web/controllers/claims/UmaRequestingPartyClaimsCollectionEndpointController.java