com.sun.jersey.oauth.client
Interface OAuthClientFilter.AuthHandler

Enclosing class:
OAuthClientFilter

public static interface OAuthClientFilter.AuthHandler

Implementation of this interface should be passed to the filter constructor to handle user authorization requests and respond to obtaining a new access token (e.g. by storing it for future use).


Method Summary
 java.lang.String authorize(java.net.URI authorizationUri)
          Method called by the filter when an authorization of a request token is needed.
 void authorized(java.lang.String token, java.lang.String tokenSecret)
          Notifies the handler that the application was authorized by the user and a new access token was obtained.
 

Method Detail

authorize

java.lang.String authorize(java.net.URI authorizationUri)
Method called by the filter when an authorization of a request token is needed. Implementation should redirect user to the authorization URI passed as the parameter to this method and return the verification code (or null) generated by the server in a response to user authorization.

Parameters:
authorizationUri - Authorization URI the user should be redirected to.
Returns:
verifier code that was generated by the server, null if the user refused to authorize the client.

authorized

void authorized(java.lang.String token,
                java.lang.String tokenSecret)
Notifies the handler that the application was authorized by the user and a new access token was obtained. Application may want to store this for future use (to avoid the need for a new authorization next time it runs).

Parameters:
token - The new access token.
tokenSecret - Secret corresponding to the new access token.


Copyright © 2011 Oracle Corporation. All Rights Reserved.