com.googlecode.fascinator.portal.sso
Interface SSOInterface

All Known Implementing Classes:
OpenID, USQSSO

public interface SSOInterface

An interface defining what methods SSO implementations should expose to The Fascinator. Modeled off (and valid for) OpenID and USQSSO.

Author:
Greg Pendlebury

Method Summary
 String getId()
          Return the ID of a given SSO implementation.
 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 if the SSO provider supports such.
 User getUserObject(JsonSessionState session)
          Get the current user details in a User object.
 void logout(JsonSessionState session)
          Logout the current user, if implementing providers do not support this at least clear Fascinator session data regarding this user.
 void ssoCheckUserDetails(JsonSessionState session)
          Get user details 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 a login with the SSO provider
 

Method Detail

getId

String getId()
Return the ID of a given SSO implementation. Used with the ServiceLoader for instantiation.

Returns:
String The SSO implementation ID.

getLabel

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

Returns:
String The SSO implementation label.

getInterface

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"

Parameters:
ssoUrl - The basic ssoUrl for the server.
Returns:
String The string to display as link text.

getRolesList

List<String> getRolesList(JsonSessionState session)
Get a list of roles possessed by the current user if the SSO provider supports such.

Returns:
List A list of roles.

getUserObject

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

Returns:
User A user object containing the current user.

logout

void logout(JsonSessionState session)
Logout the current user, if implementing providers do not support this at least clear Fascinator session data regarding this user.


ssoInit

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

Parameters:
session - The server session data
request - The incoming servlet request
Throws:
Exception - if any errors occur

ssoCheckUserDetails

void ssoCheckUserDetails(JsonSessionState session)
Get user details and set them in the user session. Some implementations may establish a provider connection to get these, others will already have them from a callback.


ssoGetRemoteLogonURL

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

Returns:
String The URL used by the SSO Service for logins

ssoPrepareLogin

void ssoPrepareLogin(JsonSessionState session,
                     String returnAddress,
                     String server)
                     throws Exception
Prepare a login with the SSO provider

Parameters:
returnAddress - The return address after login
server - The server domain
Throws:
Exception - if any errors occur


Copyright © 2009-2013. All Rights Reserved.