com.googlecode.fascinator.portal.sso
Class OpenID

java.lang.Object
  extended by com.googlecode.fascinator.portal.sso.OpenID
All Implemented Interfaces:
SSOInterface

public class OpenID
extends Object
implements SSOInterface

Fascinator and OpenID integration.

Author:
Greg Pendlebury

Constructor Summary
OpenID()
           
 
Method Summary
 String getId()
          Return the OpenID ID.
 String getInterface(String ssoUrl)
          Return the HTML snippet to use in the interface.
 String getLabel()
          Return the on-screen label to describing this implementation.
 List<String> getRolesList(JsonSessionState session)
          Get a list of roles possessed by the current user from the SSO Service.
 User getUserObject(JsonSessionState session)
          Get the current user details in a User object.
 void logout(JsonSessionState session)
          We cannot log the user out of UConnect, but we can clear Fascinator session data regarding this user.
 void ssoCheckUserDetails(JsonSessionState session)
          Get user details from the SSO Service and set them in the user session.
 String ssoGetRemoteLogonURL(JsonSessionState session)
          Retrieve the login URL for redirection.
 void ssoInit(JsonSessionState session, javax.servlet.http.HttpServletRequest request)
          Initialize the SSO Service
 void ssoPrepareLogin(JsonSessionState session, String returnAddress, String server)
          Prepare the SSO Service to receive a login from the user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenID

public OpenID()
Method Detail

getId

public String getId()
Return the OpenID ID. Must match configuration at instantiation.

Specified by:
getId in interface SSOInterface
Returns:
String The SSO implementation ID.

getLabel

public String getLabel()
Return the on-screen label to describing this implementation.

Specified by:
getLabel in interface SSOInterface
Returns:
String The SSO implementation label.

getInterface

public String getInterface(String ssoUrl)
Return the HTML snippet to use in the interface. Implementations can append additional params to URLs. Like so: "?ssoId=OpenID&{customString}" eg: "?ssoId=OpenID&provider=Google"

Specified by:
getInterface in interface SSOInterface
Parameters:
ssoUrl - The basic ssoUrl for the server.
Returns:
String The string to display as link text.

getUserObject

public User getUserObject(JsonSessionState session)
Get the current user details in a User object.

Specified by:
getUserObject in interface SSOInterface
Returns:
User A user object containing the current user.

logout

public void logout(JsonSessionState session)
We cannot log the user out of UConnect, but we can clear Fascinator session data regarding this user.

Specified by:
logout in interface SSOInterface

ssoInit

public void ssoInit(JsonSessionState session,
                    javax.servlet.http.HttpServletRequest request)
             throws Exception
Initialize the SSO Service

Specified by:
ssoInit in interface SSOInterface
Parameters:
session - The server session data
request - The incoming servlet request
Throws:
Exception - if any errors occur

ssoPrepareLogin

public void ssoPrepareLogin(JsonSessionState session,
                            String returnAddress,
                            String server)
                     throws Exception
Prepare the SSO Service to receive a login from the user

Specified by:
ssoPrepareLogin in interface SSOInterface
Parameters:
returnAddress - The address to come back to after the login
server - The server domain
Throws:
Exception - if any errors occur

ssoGetRemoteLogonURL

public String ssoGetRemoteLogonURL(JsonSessionState session)
Retrieve the login URL for redirection.

Specified by:
ssoGetRemoteLogonURL in interface SSOInterface
Returns:
String The URL used by the SSO Service for logins

ssoCheckUserDetails

public void ssoCheckUserDetails(JsonSessionState session)
Get user details from the SSO Service and set them in the user session.

Specified by:
ssoCheckUserDetails in interface SSOInterface

getRolesList

public List<String> getRolesList(JsonSessionState session)
Get a list of roles possessed by the current user from the SSO Service.

Specified by:
getRolesList in interface SSOInterface
Returns:
List Array of roles.


Copyright © 2009-2013. All Rights Reserved.