You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2012/11/22 17:26:16 UTC
svn commit: r1412608 -
/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
Author: sergeyb
Date: Thu Nov 22 16:26:15 2012
New Revision: 1412608
URL: http://svn.apache.org/viewvc?rev=1412608&view=rev
Log:
Minor update to OAuthClientUtils
Modified:
cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java?rev=1412608&r1=1412607&r2=1412608&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java (original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java Thu Nov 22 16:26:15 2012
@@ -234,24 +234,31 @@ public final class OAuthClientUtils {
* @param accessToken the access token
* @return the header value
*/
+ @Deprecated
public static String createAuthorizationHeader(Consumer consumer,
ClientAccessToken accessToken)
throws OAuthServiceException {
- StringBuilder sb = new StringBuilder();
- appendTokenData(sb, accessToken, null);
- return sb.toString();
+ return createAuthorizationHeader(accessToken);
+ }
+
+ /**
+ * Creates OAuth Authorization header with Bearer scheme
+ * @param accessToken the access token
+ * @return the header value
+ */
+ public static String createAuthorizationHeader(ClientAccessToken accessToken)
+ throws OAuthServiceException {
+ return createAuthorizationHeader(accessToken, null);
}
/**
* Creates OAuth Authorization header with the scheme that
* may require an access to the current HTTP request properties
- * @param consumer represents the registered client
* @param accessToken the access token
* @param httpProps http request properties, can be null for Bearer tokens
* @return the header value
*/
- public static String createAuthorizationHeader(Consumer consumer,
- ClientAccessToken accessToken,
+ public static String createAuthorizationHeader(ClientAccessToken accessToken,
HttpRequestProperties httpProps)
throws OAuthServiceException {
StringBuilder sb = new StringBuilder();