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:30:45 UTC
svn commit: r1412611 - in /cxf/branches/2.6.x-fixes: ./
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:30:44 2012
New Revision: 1412611
URL: http://svn.apache.org/viewvc?rev=1412611&view=rev
Log:
Merged revisions 1412608 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1412608 | sergeyb | 2012-11-22 16:26:15 +0000 (Thu, 22 Nov 2012) | 1 line
Minor update to OAuthClientUtils
........
Modified:
cxf/branches/2.6.x-fixes/ (props changed)
cxf/branches/2.6.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Merged /cxf/trunk:r1412608
Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.6.x-fixes/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/branches/2.6.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java?rev=1412611&r1=1412610&r2=1412611&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java (original)
+++ cxf/branches/2.6.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java Thu Nov 22 16:30:44 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();