Gets access tokens.

@return the access tokens
323283
@ReadOperation
    public Collection<Ticket> getTokens() {
        return ticketRegistry.getTickets(ticket -> (ticket instanceof AccessToken || ticket instanceof RefreshToken) && !ticket.isExpired())
            .sorted(Comparator.comparing(Ticket::getId))
            .collect(Collectors.toList());
    }
920028
public function getAccessToken()
    {
        return $this->requestHandler->sendRequestAsync('POST', 'api/v4/oauth/access_token/')->then(
            function ($tokenValues) {
                parse_str($tokenValues, $tokenArray);
                $token = $tokenArray['oauth_token'];
                $tokenSecret = $tokenArray['oauth_token_secret'];
                $this->requestHandler->setAccessTokenCredentials($token, $tokenSecret);
                return $tokenArray;
            }
        );
    }
638000
@Override
  public BatchCredentials getCredentials() {

    final TokenCredentials tokenCredentials = new TokenCredentials(null, System.getenv(AZ_BATCH_AUTH_TOKEN_ENV));

    return new BatchCredentials() {
      @Override
      public String baseUrl() {
        return azureBatchAccountUri;
      }

      @Override
      public void applyCredentialsFilter(final OkHttpClient.Builder builder) {
        tokenCredentials.applyCredentialsFilter(builder);
      }
    };
  }
824405
public Map<String, String> fetchTokenKeys() {
		try {
			return extractTokenKeys(this.restTemplate
					.getForObject(getUaaUrl() + "/token_keys", Map.class));
		}
		catch (HttpStatusCodeException ex) {
			throw new CloudFoundryAuthorizationException(Reason.SERVICE_UNAVAILABLE,
					"UAA not reachable");
		}
	}
1075365
protected String getToken() {
        return dataMgr.getSessionDAO().session() != null ? dataMgr.getSessionDAO().session().getAccessToken() : null;
    }
874691
public List<AccessControlEntry> getPermissionEntries()
   {
      List<AccessControlEntry> list = new ArrayList<AccessControlEntry>();
      for (int i = 0, length = accessList.size(); i < length; i++)
      {
         AccessControlEntry entry = accessList.get(i);
         list.add(new AccessControlEntry(entry.getIdentity(), entry.getPermission()));
      }
      return list;
   }
649779
public static Group groupsGet(String access_token){
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setUri(BASE_URI+"/cgi-bin/groups/get")
				.addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))
				.build();
		return LocalHttpClient.executeJsonResult(httpUriRequest,Group.class);
	}
61085
public Collection<GrantedAuthority> getAuthorities() {
        Set<GrantedAuthority> authorities = new HashSet<GrantedAuthority>();
        for (Role role : Role.ROLE_USER.getRoleHierarchy()) {
            authorities.add(new SimpleGrantedAuthority(role.name()));
        }

        if (accountRights != null) {
            for (AccountRights rights : accountRights) {
                Set<Role> roles = rights.getRoles();
                if (roles != null) {
                    for (Role role : roles) {
                        authorities.add(role.authority());
                    }
                }
            }
        }

        if (isRoot()) {
            authorities.add(new SimpleGrantedAuthority(Role.ROLE_ROOT.name()));
        }
        return authorities;
    }
410560
public java.util.List<AuthorizationRule> getAuthorizationRules() {
        if (authorizationRules == null) {
            authorizationRules = new com.amazonaws.internal.SdkInternalList<AuthorizationRule>();
        }
        return authorizationRules;
    }
1070843
public String[] getTokenArray() {
        checkTokenized();
        if (this.tokens == null) {
            return null;
        }
        final String[] clone = new String[this.tokens.length];
        for (int i = 0; i < this.tokens.length; i++) {
            clone[i] = this.tokens[i];
        }        
        return clone;
    }
150966
public function getAccessToken()
    {
        $this->getLogger()->debug('Get access token. If expired try to update');

        if ($this->isAccessTokenExpired() && $this->getRefreshToken()) {
            $this->fetchAccessTokenWithRefreshToken($this->getRefreshToken());
        }

        return parent::getAccessToken();
    }
142291
@JsonIgnore
	public Collection<? extends GrantedAuthority> getAuthorities() {
		if (user.isAdmin()) {
			return Collections.singleton(new SimpleGrantedAuthority(Roles.ADMIN.toString()));
		} else if (user.isModerator()) {
			return Collections.singleton(new SimpleGrantedAuthority(Roles.MOD.toString()));
		} else {
			return Collections.singleton(new SimpleGrantedAuthority(Roles.USER.toString()));
		}
	}
417988
public String getAccessKey() {
		String accessKey = getAsNullableString("access_key");
		accessKey = accessKey != null ? accessKey : getAsNullableString("client_key");
		return accessKey;
	}
1005862
def access_token(self):
        """"""
        access_token = self.get_auth_bearer()
        if not access_token:
            access_token = self.query_kwargs.get('access_token', '')
            if not access_token:
                access_token = self.body_kwargs.get('access_token', '')

        return access_token
736333
def access_token(self):
        
        access_token = self.session.get(self.access_token_key)
        if access_token:
            if not self.expires_at:
                # user provided access_token, just return it
                return access_token

            timestamp = time.time()
            if self.expires_at - timestamp > 60:
                return access_token

        self.fetch_access_token()
        return self.session.get(self.access_token_key)
1249070
public TokenRequestBuilder getTokenEndPoint() {
    for(Authentication auth : getAuthentications().values()) {
      if (auth instanceof OAuth) {
        OAuth oauth = (OAuth) auth;
        return oauth.getTokenRequestBuilder();
      }
    }
    return null;
  }
150775
public function getToken()
    {
        if (Cache::has(self::CACHE_NAME)) {
            return Cache::get(self::CACHE_NAME);
        } else {
            $url    = $this->url."token";
            $option = [
                'grant_type'    => 'client_credentials',
                'client_id'     => $this->client_id,
                'client_secret' => $this->client_secret,
            ];
            $return = Http::postCurl($url, $option);
            Cache::put(self::CACHE_NAME, $return['access_token'], (int) ($return['expires_in'] / 60));

            return $return['access_token'];

        }
    }