{@inheritdoc}

@see http://developer.okta.com/docs/api/resources/oidc.html#response-example-success
973351
protected function mapUserToObject(array $user)
    {
        return (new User)->setRaw($user)->map([
            'id' => Arr::get($user, 'sub'),
            'email' => Arr::get($user, 'email'),
            'email_verified' => Arr::get($user, 'email_verified', false),
            'nickname' => Arr::get($user, 'nickname'),
            'name' => Arr::get($user, 'name'),
            'first_name' => Arr::get($user, 'given_name'),
            'last_name' => Arr::get($user, 'family_name'),
            'profileUrl' => Arr::get($user, 'profile'),
            'address' => Arr::get($user, 'address'),
            'phone' => Arr::get($user, 'phone'),
        ]);
    }
477274
public static Tag outcome(ClientResponse response) {
		try {
			if (response != null) {
				HttpStatus status = response.statusCode();
				if (status.is1xxInformational()) {
					return OUTCOME_INFORMATIONAL;
				}
				if (status.is2xxSuccessful()) {
					return OUTCOME_SUCCESS;
				}
				if (status.is3xxRedirection()) {
					return OUTCOME_REDIRECTION;
				}
				if (status.is4xxClientError()) {
					return OUTCOME_CLIENT_ERROR;
				}
				if (status.is5xxServerError()) {
					return OUTCOME_SERVER_ERROR;
				}
			}
			return OUTCOME_UNKNOWN;
		}
		catch (IllegalArgumentException exc) {
			return OUTCOME_UNKNOWN;
		}
	}
1362505
@Override
    public boolean handleExecutionOutcome(
            FlowExecutionOutcome outcome, ActionRequest request, ActionResponse response) {
        if (this.redirectOnEnds != null && this.redirectOnEnds.containsKey(outcome.getId())) {
            final String redirectPath =
                    request.getContextPath() + this.redirectOnEnds.get(outcome.getId());
            try {
                response.sendRedirect(redirectPath);
                return true;
            } catch (IOException e) {
                this.logger.warn("Failed to send flow-end redirect to '" + redirectPath + "'");
            }
        }

        return false;
    }
669504
public function success($msg = null, $data = null, $extraData = [])
    {
        $return = $this->output(1, $msg, $data, $extraData);

        return $this->responseJson($return);
    }
908462
public function success($str = 'Success', $sub_header = null)
    {
        // by using this hook you can overwrite default behavior of this method
        if ($this->hookHasCallbacks('displaySuccess')) {
            return $this->hook('displaySuccess', [$str, $sub_header]);
        }

        /* below code works, but pollutes output with bad id=xx
        $success = new Message([$str, 'id'=>false, 'type'=>'success', 'icon'=>'check']);
        $success->app = $this->app;
        $success->init();
        $success->text->addParagraph($sub_header);
         */
        $success = $this->app->loadTemplate($this->successTemplate);
        $success['header'] = $str;

        if ($sub_header) {
            $success['message'] = $sub_header;
        } else {
            $success->del('p');
        }

        $js = $this->js()
            ->html($success->render());

        return $js;
    }
713869
public static ReplyObject success(final String name, final Object result) {
        final ReplyObject ret = new ReplyObject(name, result);
        ret.success = true;
        return ret;
    }
716371
public function response($data, $format, $is_success=true, $status_code = 200)
    {
        $this->httpCode($status_code);
        if ($is_success) {
            $data['status'] = 1;
        } else {
            $data['status'] = 0;
        }
        switch ($format) {
            case self::RESPONSE_TYPE_JSON:
                $response_content = JsonHelper::encode($data);
                break;
            case self::RESPONSE_TYPE_XML:
                header('Content-type:application/xml');
                $response_content = XMLHelper::encode($data);
                break;
            default:
                $response_content = '';
        }
        if (!$is_success) {
            $this->swooleResponse->end($response_content);
        } else {
            echo $response_content;
        }
    }
801059
public function response(ServerRequestInterface $request, ResponseInterface $response)
    {
        // Demo contents
        $contents = 'It works!';

        // Write Response to Body
        $response->getBody()->write($contents);

        // PSR-7 response
        return $response;
    }
187222
protected function respond($response)
    {
        $success = Arr::get($response, 'success');

        return $this->mapResponse($success, $response);
    }
709493
public function successData($data, $msg = null, $extraData = [])
    {
        $return = $this->output(1, $msg, $data, $extraData);

        return $this->responseJson($return);
    }
77202
public function successResponse($data = null, $statusCode = null, array $meta = []):JsonResponse
    {
        return app(Responder::class)->success($data, $statusCode, $meta);
    }
820638
public static Response success(SessionId sessionId, Object value) {
    Response response = new Response();
    response.setSessionId(sessionId != null ? sessionId.toString() : null);
    response.setValue(value);
    response.setStatus(ErrorCodes.SUCCESS);
    response.setState(ErrorCodes.SUCCESS_STRING);
    return response;
  }
1065360
public static function processResult(string $url, ResponseInterface $response)
    {
        $body = $response->getBody()->getContents();
        $body = Tools::jsonNumbersToString($body);
        $result = Json::decode($body);
        self::checkErrors($result, $url);

        return $result;
    }
37724
function(originalResponse, successful) {
            var response = originalResponse;

            // The passed "response" param may not be a response at all.
            // It could be a string, detailing the error, for example.
            if (!qq.isObject(originalResponse)) {
                response = {};

                if (qq.isString(originalResponse) && !successful) {
                    response.error = originalResponse;
                }
            }

            response.success = successful;

            return response;
        }
1221696
def success_results(content = nil, reply_to = '*test*1')
      Result.new(AgentIdentity.generate, reply_to,
        { @agent_id => OperationResult.success(content) }, @agent_id)
    end
385060
public static DefaultGoApiResponse success(String responseBody) {
        DefaultGoApiResponse defaultGoApiResponse = new DefaultGoApiResponse(SUCCESS_RESPONSE_CODE);
        defaultGoApiResponse.setResponseBody(responseBody);
        return defaultGoApiResponse;
    }
750659
@Override
	public HttpResponse execute() throws IOException {
		if (this.method == HttpMethod.GET) {
			String url = this.toString();
			if (url.length() > this.cutoff) {
				if (log.isLoggable(Level.FINER))
					log.finer("URL length " + url.length() + " too long, converting GET to POST: " + url);
				
				String rebase = this.baseURL + "?method=GET";
				return this.execute(HttpMethod.POST, rebase);
			}
		}

		return super.execute();
	}