Exposes the current user to {@code /me} URL.
971582
public User getMe() {
        User u = User.current();
        if (u == null)
            throw new AccessDeniedException("/me is not available when not logged in");
        return u;
    }
733284
def me(self):
        

        if self._me is not None:
            return self._me

        self._me = self.Person("{username}@{server}".format(
            username=self.client.nickname,
            server=self.client.server,
        ))
        return self._me
352730
function(userId) {
    return new Promise((resolve, reject) => {
      this._start()
          .uri('/api/user')
          .urlSegment(userId)
          .get()
          .go(this._responseHandler(resolve, reject));
    });
  }
1351889
def me(params={})
      response = get("/v2/me.json", params)
      user = ACTV::User.from_response(response)
      user.access_token =  @oauth_token
      user
    end
760475
public GetCurrentUsersProfileRequest.Builder getCurrentUsersProfile() {
    return new GetCurrentUsersProfileRequest.Builder(accessToken)
            .setDefaults(httpManager, scheme, host, port);
  }
897682
private StitchUserT doLogin(final StitchCredential credential, final boolean asLinkRequest) {
    final Response response = doLoginRequest(credential, asLinkRequest);

    final StitchUserT previousUser = activeUser;
    final StitchUserT user = processLoginResponse(credential, response, asLinkRequest);

    if (asLinkRequest) {
      onUserLinked(user);
    } else {
      onUserLoggedIn(user);
      onActiveUserChanged(activeUser, previousUser);
    }

    return user;
  }
216372
public function me()
    {
        $this->loadModel('User.Users');
        $user = $this->Users->get(user()->id, ['conditions' => ['status' => 1]]);
        $languages = LocaleToolbox::languagesList();

        if ($this->request->data()) {
            $user->accessible(['id', 'username', 'roles', 'status'], false);
            $user = $this->Users->patchEntity($user, $this->request->data);
            if ($this->Users->save($user)) {
                $this->Flash->success(__d('user', 'User information successfully updated!'), ['key' => 'user_profile']);
                $this->redirect($this->referer());
            } else {
                $this->Flash->danger(__d('user', 'User information could not be saved, please check your information.'), ['key' => 'user_profile']);
            }
        }

        $this->title(__d('user', 'Account'));
        $this->set(compact('user', 'languages'));
        $this->viewMode('full');
    }
866927
void resolveUrl() throws IOException, StorageException, KeyManagementException, NoSuchAlgorithmException{
		String tempUrl;
		if(context.isCluster){
			if(this.context.lastBalancerResponse!=null){
				tempUrl = this.context.lastBalancerResponse;				
			} else {
				//System.out.println("[-] Balancer resolve! " + this.context);
				String urlString = context.url + "?appkey=" + context.applicationKey;
				URL url = new URL(urlString);
				String balancerResponse = urlString.startsWith("https:") ? secureBalancerRequest(url) : unsecureBalancerRequest(url);
				if(balancerResponse == null){
					throw new StorageException("Cannot get response from balancer!");
				}
				JSONObject obj = (JSONObject) JSONValue.parse(balancerResponse);
				tempUrl = (String)obj.get("url");
				this.context.lastBalancerResponse = tempUrl;
			}
		} else {
			tempUrl = context.url;
		}
		//tempUrl = "https://storage-ssl-prd-useast1-s0002.realtime.co:443/";
		//this.requestUrl += this.requestUrl.substring(this.requestUrl.length() - 1).equals("/") ? this.type.toString() : "/"+this.type.toString();
		tempUrl += tempUrl.substring(tempUrl.length() - 1).equals("/") ? this.type.toString() : "/"+this.type.toString();
		//path += path.substring(path.length(), 1).equals("/") ? this.type.toString() : "/"+this.type.toString();
		this.requestUrl = new URL(tempUrl);
		//System.out.println(String.format("Rest url: %s",this.requestUrl));
	}
98371
def get_me(self):
        
        response = self.request_json(self.config['me'])
        user = objects.Redditor(self, response['name'], response)
        user.__class__ = objects.LoggedInRedditor
        return user
1123211
public void setUrl(final String url) {
        final String old = this.url;

        this.url = url;
        this.connectionConfig = System.currentTimeMillis();
        this.connectionValidated = false;

        this.pcs.firePropertyChange("url", old, this.url);
    }
1140083
public static void setCurrentUser(UserGroupInformation ugi) {
    Subject user = SecurityUtil.getSubject(ugi);
    currentUser.set(user);
  }
432864
private User fetch(final String token) {
        try {
            return new DefaultFacebookClient(
                token,
                this.requestor,
                new DefaultJsonMapper(),
                Version.LATEST
            ).fetchObject(
                "me", User.class
            );
        } catch (final FacebookException ex) {
            throw new IllegalArgumentException(ex);
        }
    }
492989
@GET
    @Produces(MediaType.APPLICATION_JSON)
    @Path("/userinfo")
    @Description("Returns the user info of the user who is logged in.")
    public PrincipalUserDto userInfo(@Context HttpServletRequest req) {
        String userName=findUserByToken(req);
        PrincipalUser user = _uService.findUserByUsername(userName);
        return PrincipalUserDto.transformToDto(user);
    }
629052
def me
      data = get("/me").body

      Resources::Me.new({ client: self }.merge(data))
    end
515775
def expose(url="/", methods=("GET",)):
    

    def wrap(f):
        if not hasattr(f, "_urls"):
            f._urls = []
        f._urls.append((url, methods))
        return f

    return wrap
237192
def _initURL(self,
                 org_url,
                 referer_url):
        
        if org_url is not None and org_url != '':
            if not org_url.startswith('http://') and not org_url.startswith('https://'):
                org_url = 'https://' + org_url
            self._org_url = org_url

            if self._org_url.lower().find('/sharing/rest') > -1:
                self._url = self._org_url
            else:
                self._url = self._org_url + "/sharing/rest"

            if self._url.startswith('http://'):
                self._surl = self._url.replace('http://', 'https://')
            else:
                self._surl = self._url

            parsed_url = urlparse(self._org_url)
            self._parsed_org_url = urlunparse((parsed_url[0],parsed_url[1],"","","",""))

        if referer_url is None:
            parsed_org = urlparse(self._org_url)
            self._referer_url = parsed_org.netloc

            url = '{}/portals/self'.format( self._url)

        parameters = {
            'f': 'json'
        }
        portal_info = self._post(url=url,
                                 param_dict=parameters,
                                 securityHandler=self,
                                 proxy_port=self._proxy_port,
                                 proxy_url=self._proxy_url)
        if 'user' in portal_info:
            if 'username' in portal_info['user']:
                self._username = portal_info['user']['username']
58718
def setUrl(self, url):
        
        if isUrl(url):
            self._url = url
        else:
            raise exceptions.BadUrlException(url)
        return self