org.brickred.socialauth.util
Class OpenIdConsumer

java.lang.Object
  extended by org.brickred.socialauth.util.OpenIdConsumer

public class OpenIdConsumer
extends Object

Author:
tarunn@brickred.com

Field Summary
static String OPENID_REQUEST_TOKEN
           
 
Constructor Summary
OpenIdConsumer()
           
 
Method Summary
static String getAssociationURL(String url)
          Provides an association URL.
static String getRequestTokenURL(String requestTokenUrl, String returnTo, String realm, String assocHandle, String consumerURL, String scope)
          It obtains the request token.
static Profile getUserInfo(Map<String,String> requestParams)
          Parses the user info from request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPENID_REQUEST_TOKEN

public static final String OPENID_REQUEST_TOKEN
See Also:
Constant Field Values
Constructor Detail

OpenIdConsumer

public OpenIdConsumer()
Method Detail

getAssociationURL

public static String getAssociationURL(String url)
                                throws Exception
Provides an association URL. An association between the Relying Party and the OpenID Provider establishes a shared secret between them, which is used to verify subsequent protocol messages and reduce round trips.

Parameters:
url -
Returns:
Association URL
Throws:
Exception

getRequestTokenURL

public static String getRequestTokenURL(String requestTokenUrl,
                                        String returnTo,
                                        String realm,
                                        String assocHandle,
                                        String consumerURL,
                                        String scope)
                                 throws Exception
It obtains the request token. The Request Token is a temporary token used to initiate User authorization.

Parameters:
requestTokenUrl - the Request Token URL
returnTo - Callback URL
realm - Realm
assocHandle -
consumerURL -
scope -
Returns:
Generated Request Token URL
Throws:
Exception

getUserInfo

public static Profile getUserInfo(Map<String,String> requestParams)
Parses the user info from request

Parameters:
requestParams - request parameters map
Returns:
User Profile


Copyright © 2013. All Rights Reserved.