Tabnine Logo
Request.getParameters
Code IndexAdd Tabnine to your IDE (free)

How to use
getParameters
method
in
com.atlassian.oauth.Request

Best Java code snippets using com.atlassian.oauth.Request.getParameters (Showing top 5 results out of 315)

origin: com.atlassian.applinks/applinks-oauth-plugin

/**
 * Converts the {@code Request} to an {@code OAuthMessage}.
 *
 * @param request {@code Request} to be converted to an {@code OAuthMessage}
 * @return {@code OAuthMessage} converted from the {@code Request}
 */
public static OAuthMessage asOAuthMessage(final com.atlassian.oauth.Request request) {
  checkNotNull(request, "request");
  return new OAuthMessage(
      request.getMethod().name(),
      request.getUri().toString(),
      // We'd rather not do the copy, but since we need a Collection of these things we don't have much choice
      ImmutableList.copyOf(asOAuthParameters(request.getParameters()))
  );
}
origin: com.atlassian.oauth/atlassian-oauth-bridge

/**
 * Converts the {@code Request} to an {@code OAuthMessage}.
 *
 * @param request {@code Request} to be converted to an {@code OAuthMessage}
 * @return {@code OAuthMessage} converted from the {@code Request}
 */
public static OAuthMessage asOAuthMessage(Request request) {
  checkNotNull(request, "request");
  return new OAuthMessage(
      request.getMethod().name(),
      request.getUri().toString(),
      // We'd rather not do the copy, but since we need a Collection of these things we don't have much choice
      ImmutableList.copyOf(asOAuthParameters(request.getParameters()))
  );
}
origin: com.atlassian.oauth/atlassian-oauth-consumer-core

private Request sign(Request request, OAuthAccessor accessor) {
  try {
    final URI requestUri = request.getUri();
    Preconditions.checkArgument(requestUri.normalize().getPath().equals(requestUri.getPath()),
        "Refusing to sign non-normalized URL: " + requestUri);
    OAuthMessage oauthMessage = accessor.newRequestMessage(
        request.getMethod().name(),
        requestUri.toString(),
        asOAuthParameters(request.getParameters())
    );
    log.debug("Signed request {}", oauthMessage);
    return new Request(request.getMethod(), requestUri, fromOAuthParameters(oauthMessage.getParameters()));
  } catch (net.oauth.OAuthException e) {
    throw new OAuthSigningException("Failed to sign the request", e);
  } catch (IOException e) {
    // this shouldn't happen as the message is not being read from any IO streams, but the OAuth library throws
    // these around like they're candy, but far less sweet and tasty.
    throw new RuntimeException(e);
  } catch (URISyntaxException e) {
    // this shouldn't happen unless the caller somehow passed us an invalid URI object
    throw new RuntimeException(e);
  }
}
origin: com.atlassian.applinks/applinks-oauth-plugin

public ConsumerToken getRequestToken(ServiceProvider serviceProvider, final String consumerKey, String callback) throws ResponseException {
  final Request oAuthRequest = new Request(Request.HttpMethod.POST, serviceProvider.getRequestTokenUri(),
      Collections.singleton(new Request.Parameter(OAuth.OAUTH_CALLBACK, callback)));
  final Request signedRequest = consumerService.sign(oAuthRequest, consumerKey, serviceProvider);
  final com.atlassian.sal.api.net.Request tokenRequest = requestFactory.createRequest(
      com.atlassian.sal.api.net.Request.MethodType.POST, serviceProvider.getRequestTokenUri().toString());
  tokenRequest.addRequestParameters(parameterToStringArray(signedRequest.getParameters()));
  final TokenAndSecret tokenAndSecret = requestToken(serviceProvider.getRequestTokenUri().toString(), signedRequest);
  final ConsumerToken requestToken = ConsumerToken.newRequestToken(tokenAndSecret.token)
      .tokenSecret(tokenAndSecret.secret)
      .consumer(getConsumer(consumerKey))
      .build();
  assert (requestToken.isRequestToken());
  return requestToken;
}
origin: com.atlassian.applinks/applinks-oauth-plugin

private TokenAndSecret requestToken(String url, Request signedRequest)
    throws ResponseException {
  final com.atlassian.sal.api.net.Request tokenRequest = requestFactory.createRequest(com.atlassian.sal.api.net.Request.MethodType.POST, url);
  tokenRequest.addRequestParameters(parameterToStringArray(signedRequest.getParameters()));
com.atlassian.oauthRequestgetParameters

Javadoc

Returns the parameters to be sent as part of the request.

Popular methods of Request

  • <init>
  • getMethod
    Returns the HTTP method to use when making the request - either GET or POST.
  • getUri
    Returns the URI to make the request to.
  • copy
  • getParameterMap
  • makeParameterMap
  • makeUnmodifiableMap

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Notification (javax.management)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now