|
Apache CXF API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cxf.rs.security.oauth.client.OAuthClientUtils
public final class OAuthClientUtils
The utility class for simplifying making OAuth request and access token requests as well as for creating Authorization OAuth headers
| Nested Class Summary | |
|---|---|
static class |
OAuthClientUtils.Consumer
Simple consumer representation |
static class |
OAuthClientUtils.Token
Simple token representation |
| Method Summary | |
|---|---|
static String |
createAuthorizationHeader(OAuthClientUtils.Consumer consumer)
Creates OAuth Authorization header containing consumer key and secret values only |
static String |
createAuthorizationHeader(OAuthClientUtils.Consumer consumer,
OAuthClientUtils.Token accessToken,
String method,
String requestURI)
Creates OAuth Authorization header |
static OAuthClientUtils.Token |
getAccessToken(WebClient accessTokenService,
OAuthClientUtils.Consumer consumer,
OAuthClientUtils.Token requestToken,
String verifier)
Returns a simple representation of the Access token |
static URI |
getAuthorizationURI(String authorizationServiceURI,
String requestToken)
Returns URI of the authorization service with the query parameter containing the request token key |
static OAuthClientUtils.Token |
getRequestToken(WebClient requestTokenService,
OAuthClientUtils.Consumer consumer,
URI callback,
Map<String,String> extraParams)
Returns a simple representation of the Request token |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static URI getAuthorizationURI(String authorizationServiceURI,
String requestToken)
authorizationServiceURI - the service URIrequestToken - the request token key
public static OAuthClientUtils.Token getRequestToken(WebClient requestTokenService,
OAuthClientUtils.Consumer consumer,
URI callback,
Map<String,String> extraParams)
throws OAuthServiceException
requestTokenService - initialized RequestToken service clientconsumer - Consumer bean containing the consumer key and secretcallback - the callback URI where the request token verifier will
be returnedextraParams - additional parameters such as state, scope, etc
OAuthServiceException
public static OAuthClientUtils.Token getAccessToken(WebClient accessTokenService,
OAuthClientUtils.Consumer consumer,
OAuthClientUtils.Token requestToken,
String verifier)
throws OAuthServiceException
accessTokenService - initialized AccessToken service clientconsumer - Consumer bean containing the consumer key and secretverifier - the verifier/authorization key
OAuthServiceException
public static String createAuthorizationHeader(OAuthClientUtils.Consumer consumer,
OAuthClientUtils.Token accessToken,
String method,
String requestURI)
consumer - Consumer bean containing the consumer key and secrettoken - Access token representationmethod - HTTP methodrequestURI - request URI
public static String createAuthorizationHeader(OAuthClientUtils.Consumer consumer)
consumer - Consumer bean containing the consumer key and secret
|
Apache CXF API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||