Get access token-secret pair

@param	verifier OAuth verifier, which was got after authorization
@return	Access token-secret pair
168957
public HashMap<String, String> getAccessTokenSet(String verifier) {
		try {
            mOAuthProvider.retrieveAccessToken(mOAuthConsumer, verifier);
        }
        catch (OAuthException e) {
            e.printStackTrace();
        }
		
		return setTokenWithSecret(mOAuthConsumer.getToken(), mOAuthConsumer.getTokenSecret()); 
	}
280917
private boolean isSnowflakeAuthenticator()
  {
    String authenticator = (String) connectionPropertiesMap.get(
        SFSessionProperty.AUTHENTICATOR);

    PrivateKey privateKey = (PrivateKey) connectionPropertiesMap.get(
        SFSessionProperty.PRIVATE_KEY);

    return (authenticator == null && privateKey == null) ||
           ClientAuthnDTO.AuthenticatorType.SNOWFLAKE.name()
               .equalsIgnoreCase(authenticator);
  }
1303181
def client(self, verifier=None):
        
        # We're just starting out and don't have neither request nor access
        # token. Return the standard client
        if not self._request_token and not self._access_token:
            client = oauth.Client(self.consumer, timeout=TIMEOUT)
        
        # We're one step in, we've got the request token and can add that to 
        # the client.
        if self._request_token and not self._access_token:
            if verifier is not None:
                self._request_token.set_verifier(verifier)
            client = oauth.Client(self.consumer, self._request_token, timeout=TIMEOUT)
            
        # Two steps in, we've got an access token and can now properly sign 
        # our client requests with it.
        if self._access_token:
            client = oauth.Client(self.consumer, self._access_token, timeout=TIMEOUT)
        
        return client
296118
public Preauthorization get( final Preauthorization preauthorization ) {
    return RestfulUtils.show( PreauthorizationService.PATH, preauthorization, Preauthorization.class, super.httpClient );
  }
113477
def get_oauth_token_secret_name(self, provider):
        
        for _provider in self.oauth_providers:
            if _provider["name"] == provider:
                return _provider.get("token_secret", "oauth_token_secret")
894022
public TokenAuthenticationManager getTokenAuthenticationManager() {
        if (tokenManager != null) {
            return tokenManager;
        }
        tokenManager = (TokenAuthenticationManager) ContainerManager.getComponent("tokenAuthenticationManager");
        return tokenManager;
    }
647675
function getAccessToken($oauth_verifier = FALSE)
    {
        $parameters = [];
        if (!empty($oauth_verifier)) {
            $parameters['oauth_verifier'] = $oauth_verifier;
        }
        $request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters);
        $token = OAuthUtil::parse_parameters($request);
        $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
        return $token;
    }
125280
def get_access_token
      @client = TwitterOAuth::Client.new(:consumer_key => ConsumerKey, :consumer_secret => ConsumerSecret)
      request_token = @client.request_token
      # ask the user to visit the auth url
      puts "To authenticate your client, visit the URL: #{request_token.authorize_url}"
      open_link request_token.authorize_url
      # wait for the user to give us the PIN back
      print 'Enter PIN: '
      begin
        @client.authorize(request_token.token, request_token.secret, :oauth_verifier => self.class.get_input.chomp)
      rescue OAuth::Unauthorized
        false # Didn't get an access token
      end
    end
1278730
protected Pair<String, String> getClientIdAndClientSecret(final WebContext context) {
        val extractor = new BasicAuthExtractor();
        val upc = extractor.extract(context);
        if (upc != null) {
            return Pair.of(upc.getUsername(), upc.getPassword());
        }
        val clientId = context.getRequestParameter(OAuth20Constants.CLIENT_ID);
        val clientSecret = context.getRequestParameter(OAuth20Constants.CLIENT_SECRET);
        return Pair.of(clientId, clientSecret);
    }
642740
private static Credential getCredentialFromAccessTokenProvider(
      AccessTokenProvider accessTokenProvider, Collection<String> scopes)
      throws IOException, GeneralSecurityException {
    Preconditions.checkArgument(
        accessTokenProvider.getAccessToken() != null, "Access Token cannot be null!");
    GoogleCredential credential =
        GoogleCredentialWithAccessTokenProvider.fromAccessTokenProvider(
            Clock.SYSTEM, accessTokenProvider);
    // TODO: credential.createScoped does nothing at the moment, since
    //  GoogleCredentialWithAccessTokenProvider never sets the serviceAccountPrivateKey.
    //  The AccessTokenProvider interface does not provide a mechanism to return a private key,
    //  and scopes cannot be sent down to the AccessTokenProvider
    //  so they're essentially ignored at the moment.
    return credential.createScoped(scopes);
  }
1116860
public ServiceFuture<SecretBundle> getSecretAsync(String secretIdentifier,
            final ServiceCallback<SecretBundle> serviceCallback) {
        SecretIdentifier id = new SecretIdentifier(secretIdentifier);
        return getSecretAsync(id.vault(), id.name(), id.version() == null ? "" : id.version(), serviceCallback);
    }
1116931
@Override
    public OAuthToken get(String envKey) {
        if (!oAuthToken.containsKey(envKey)) return null;
        
        return oAuthToken.get(envKey);
    }
384021
def get_access_token(self):
        
        if self.access_token is None:
            request_token = self._get_rt_from_session()
            oauth = OAuth1(
                self.consumer_key,
                client_secret=self.consumer_secret,
                resource_owner_key=request_token['oauth_token'],
                resource_owner_secret=request_token['oauth_token_secret'])
            at_url = self.access_token_url
            # Passing along oauth_verifier is required according to:
            # http://groups.google.com/group/twitter-development-talk/browse_frm/thread/472500cfe9e7cdb9#
            # Though, the custom oauth_callback seems to work without it?
            oauth_verifier = get_request_param(self.request, 'oauth_verifier')
            if oauth_verifier:
                at_url = at_url + '?' + urlencode(
                    {'oauth_verifier': oauth_verifier})
            response = requests.post(url=at_url, auth=oauth)
            if response.status_code not in [200, 201]:
                raise OAuthError(
                    _('Invalid response while obtaining access token'
                      ' from "%s".') % get_token_prefix(
                          self.request_token_url))
            self.access_token = dict(parse_qsl(response.text))

            self.request.session['oauth_%s_access_token' % get_token_prefix(
                self.request_token_url)] = self.access_token
        return self.access_token
558574
public Map<String, Object> verifyCredentials(SocialLoginConfig config, String accessToken, @Sensitive String accessTokenSecret) {

        String endpointUrl = config.getUserApi();
        try {
            SocialUtil.validateEndpointWithQuery(endpointUrl);
        } catch (SocialLoginException e) {
            return createErrorResponse("TWITTER_BAD_USER_API_URL", new Object[] { endpointUrl, TwitterLoginConfigImpl.KEY_userApi, config.getUniqueId(), e.getLocalizedMessage() });
        }

        tokenSecret = accessTokenSecret;
        requestMethod = "GET";

        // Create the Authorization header string necessary to authenticate the request
        String authzHeaderString = createAuthzHeaderForVerifyCredentialsEndpoint(endpointUrl, accessToken);
        if (tc.isDebugEnabled()) {
            Tr.debug(tc, "Authz header string: " + authzHeaderString);
        }

        return executeRequest(config, requestMethod, authzHeaderString, endpointUrl, TwitterConstants.TWITTER_ENDPOINT_VERIFY_CREDENTIALS, null);
    }
1219404
def verify(self, verifier):
        ""

        # Construct the credentials for the verification request
        oauth = OAuth1(
            self.consumer_key,
            client_secret=self.consumer_secret,
            resource_owner_key=self.oauth_token,
            resource_owner_secret=self.oauth_token_secret,
            verifier=verifier,
            rsa_key=self.rsa_key,
            signature_method=self._signature_method
        )

        # Make the verification request, gettiung back an access token
        url = self.base_url + ACCESS_TOKEN_URL
        headers = {'User-Agent': self.user_agent}
        response = requests.post(url=url, headers=headers, auth=oauth)
        self._process_oauth_response(response)
        self.verified = True
1300521
def get_access_token(token, secret, verify)
      access_token = @oauth_consumer.access_token(FLICKR_OAUTH_ACCESS_TOKEN, secret, :oauth_token => token, :oauth_verifier => verify)
      @access_token, @access_secret = access_token['oauth_token'], access_token['oauth_token_secret']
      access_token
    end
605746
public Token<DelegationTokenIdentifier> createDelegationToken(String renewer) throws IOException {
    Text renewerText = new Text();
    if (renewer != null) {
      renewerText.set(renewer);
    }

    DelegationTokenIdentifier tokenIdentifier =
        requireNonNull(createTokenIdentifier(renewerText), "Token identifier");

    Token<DelegationTokenIdentifier> token = new Token<>(tokenIdentifier, secretManager);
    token.setKind(getKind());
    token.setService(service);
    logger.atFine().log("Created token %s with token identifier %s", token, tokenIdentifier);
    return token;
  }