net.oauth.OAuth.isFormEncoded()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中net.oauth.OAuth.isFormEncoded()方法的一些代码示例,展示了OAuth.isFormEncoded()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OAuth.isFormEncoded()方法的具体详情如下:
包路径:net.oauth.OAuth
类名称:OAuth
方法名:isFormEncoded

OAuth.isFormEncoded介绍

[英]Return true if the given Content-Type header means FORM_ENCODED.
[中]如果给定的内容类型标题表示FORM_ENCODED,则返回true。

代码示例

代码示例来源:origin: org.gatein.shindig/shindig-common

/**
  * @param tokenEndpoint true if this is a request token or access token request.  We don't check
  * oauth_body_hash on those.
  */
 public static SignatureType getSignatureType(boolean tokenEndpoint, String contentType) {
  if (OAuth.isFormEncoded(contentType)) {
   return SignatureType.URL_AND_FORM_PARAMS;
  }
  if (tokenEndpoint) {
   return SignatureType.URL_ONLY;
  }
  return SignatureType.URL_AND_BODY_HASH;
 }
}

代码示例来源:origin: com.lmco.shindig/shindig-common

/**
  * @param tokenEndpoint true if this is a request token or access token request.  We don't check
  * oauth_body_hash on those.
  */
 public static SignatureType getSignatureType(boolean tokenEndpoint, String contentType) {
  if (OAuth.isFormEncoded(contentType)) {
   return SignatureType.URL_AND_FORM_PARAMS;
  }
  if (tokenEndpoint) {
   return SignatureType.URL_ONLY;
  }
  return SignatureType.URL_AND_BODY_HASH;
 }
}

代码示例来源:origin: org.apache.shindig/shindig-common

/**
  * @param tokenEndpoint true if this is a request token or access token request.  We don't check
  * oauth_body_hash on those.
  */
 public static SignatureType getSignatureType(boolean tokenEndpoint, String contentType) {
  if (OAuth.isFormEncoded(contentType)) {
   return SignatureType.URL_AND_FORM_PARAMS;
  }
  if (tokenEndpoint) {
   return SignatureType.URL_ONLY;
  }
  return SignatureType.URL_AND_BODY_HASH;
 }
}

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-common

/**
  * @param tokenEndpoint true if this is a request token or access token request.  We don't check
  * oauth_body_hash on those.
  */
 public static SignatureType getSignatureType(boolean tokenEndpoint, String contentType) {
  if (OAuth.isFormEncoded(contentType)) {
   return SignatureType.URL_AND_FORM_PARAMS;
  }
  if (tokenEndpoint) {
   return SignatureType.URL_ONLY;
  }
  return SignatureType.URL_AND_BODY_HASH;
 }
}

代码示例来源:origin: apache/shindig

/**
  * @param tokenEndpoint true if this is a request token or access token request.  We don't check
  * oauth_body_hash on those.
  */
 public static SignatureType getSignatureType(boolean tokenEndpoint, String contentType) {
  if (OAuth.isFormEncoded(contentType)) {
   return SignatureType.URL_AND_FORM_PARAMS;
  }
  if (tokenEndpoint) {
   return SignatureType.URL_ONLY;
  }
  return SignatureType.URL_AND_BODY_HASH;
 }
}

代码示例来源:origin: com.lmco.shindig/shindig-gadgets

target.setQuery(null);
oauthParams.addAll(OAuth.decodeForm(query));
if (OAuth.isFormEncoded(contentType) && request.getPostBodyAsString() != null) {
 oauthParams.addAll(OAuth.decodeForm(request.getPostBodyAsString()));
} else if (bodySigningEnum == BodySigning.legacy) {
  if (!OAuth.isFormEncoded(contentType)) {
   throw new RuntimeException(
     "OAuth param location can only be post_body if post body if of " +

代码示例来源:origin: org.apache.shindig/shindig-gadgets

target.setQuery(null);
oauthParams.addAll(OAuth.decodeForm(query));
if (OAuth.isFormEncoded(contentType) && request.getPostBodyAsString() != null) {
 oauthParams.addAll(OAuth.decodeForm(request.getPostBodyAsString()));
} else if (bodySigningEnum == BodySigning.legacy) {
  if (!OAuth.isFormEncoded(contentType)) {
   throw new RuntimeException(
     "OAuth param location can only be post_body if post body if of " +

代码示例来源:origin: org.gatein.shindig/shindig-gadgets

target.setQuery(null);
oauthParams.addAll(OAuth.decodeForm(query));
if (OAuth.isFormEncoded(contentType) && request.getPostBodyAsString() != null) {
 oauthParams.addAll(OAuth.decodeForm(request.getPostBodyAsString()));
} else if (bodySigningEnum == BodySigning.legacy) {
  if (!OAuth.isFormEncoded(contentType)) {
   throw new RuntimeException(
     "OAuth param location can only be post_body if post body if of " +

代码示例来源:origin: org.gatein.shindig/shindig-gadgets

if (!OAuth.isFormEncoded(contentType)) {
 throw new OAuthRequestException(OAuthError.INVALID_REQUEST,
   "OAuth param location can only be post_body if it is of " +

代码示例来源:origin: org.apache.shindig/shindig-gadgets

if (!OAuth.isFormEncoded(contentType)) {
 throw new OAuthRequestException(OAuthError.INVALID_REQUEST,
   "OAuth param location can only be post_body if it is of " +

代码示例来源:origin: com.lmco.shindig/shindig-gadgets

if (!OAuth.isFormEncoded(contentType)) {
 throw new OAuthRequestException(OAuthError.INVALID_REQUEST,
   "OAuth param location can only be post_body if it is of " +

代码示例来源:origin: org.apache.shindig/shindig-gadgets

throw new RuntimeException("Can't read post body bytes", e);
if (OAuth.isFormEncoded(request.getHeader("Content-Type"))) {
 params.addAll(OAuth.decodeForm(request.getPostBodyAsString()));

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-gadgets

throw new RuntimeException("Can't read post body bytes", e);
if (OAuth.isFormEncoded(request.getHeader("Content-Type"))) {
 params.addAll(OAuth.decodeForm(request.getPostBodyAsString()));

代码示例来源:origin: com.lmco.shindig/shindig-gadgets

throw new RuntimeException("Can't read post body bytes", e);
if (OAuth.isFormEncoded(request.getHeader("Content-Type"))) {
 params.addAll(OAuth.decodeForm(request.getPostBodyAsString()));

代码示例来源:origin: org.apache.shindig/shindig-social-api

if (OAuth.isFormEncoded(contentType)) {
 oauthParams.addAll(OAuth.decodeForm(body));
} else if (bodySigning == BodySigning.LEGACY) {
 break;
case POST_BODY:
 if (!OAuth.isFormEncoded(contentType)) {
  throw new RuntimeException(
    "OAuth param location can only be post_body if post body is of " +

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-social-api

if (OAuth.isFormEncoded(contentType)) {
 oauthParams.addAll(OAuth.decodeForm(body));
} else if (bodySigning == BodySigning.LEGACY) {
 break;
case POST_BODY:
 if (!OAuth.isFormEncoded(contentType)) {
  throw new RuntimeException(
    "OAuth param location can only be post_body if post body is of " +

代码示例来源:origin: com.lmco.shindig/shindig-social-api

if (OAuth.isFormEncoded(contentType)) {
 oauthParams.addAll(OAuth.decodeForm(body));
} else if (bodySigning == BodySigning.LEGACY) {
 break;
case POST_BODY:
 if (!OAuth.isFormEncoded(contentType)) {
  throw new RuntimeException(
    "OAuth param location can only be post_body if post body is of " +

相关文章