Package org.gatein.sso.agent.opensso
Class OpenSSOAgentImpl
- java.lang.Object
-
- org.gatein.sso.agent.GenericAgent
-
- org.gatein.sso.agent.opensso.OpenSSOAgentImpl
-
- All Implemented Interfaces:
OpenSSOAgent
public class OpenSSOAgentImpl extends GenericAgent implements OpenSSOAgent
- Author:
- Sohil Shah
-
-
Field Summary
Fields Modifier and Type Field Description static StringIN_RESPONSE_TO_ATTR-
Fields inherited from class org.gatein.sso.agent.GenericAgent
AUTHENTICATED_CREDENTIALS
-
-
Constructor Summary
Constructors Constructor Description OpenSSOAgentImpl(org.exoplatform.container.xml.InitParams params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetSubject(String token)protected booleanisTokenValid(String token)protected PropertiesloadAttributes(String response)voidsetCookieName(String cookieName)voidsetServerUrl(String serverUrl)protected booleantryMessageFromCDC(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)This method is useful only for Cross-Domain (CD) authentication scenario when GateIn and OpenSSO are in different DNS domains and they can't share cookie.protected voidvalidateCDMessageContext(javax.servlet.http.HttpServletRequest httpRequest, org.gatein.sso.agent.opensso.CDMessageContext context)Validation of various criterias inCDMessageContextvoidvalidateTicket(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)-
Methods inherited from class org.gatein.sso.agent.GenericAgent
getContainer, getUserPrincipal, saveSSOCredentials
-
-
-
-
Field Detail
-
IN_RESPONSE_TO_ATTR
public static final String IN_RESPONSE_TO_ATTR
- See Also:
- Constant Field Values
-
-
Method Detail
-
setCookieName
public void setCookieName(String cookieName)
- Specified by:
setCookieNamein interfaceOpenSSOAgent
-
setServerUrl
public void setServerUrl(String serverUrl)
- Specified by:
setServerUrlin interfaceOpenSSOAgent
-
validateTicket
public void validateTicket(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse) throws Exception- Specified by:
validateTicketin interfaceOpenSSOAgent- Throws:
Exception
-
tryMessageFromCDC
protected boolean tryMessageFromCDC(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse) throws IOExceptionThis method is useful only for Cross-Domain (CD) authentication scenario when GateIn and OpenSSO are in different DNS domains and they can't share cookie. It performs:- Parse and validate message from OpenSSO CDCServlet.
- Use ssoToken from parsed message and establish OpenSSO cookie iPlanetDirectoryPro
- Redirects to InitiateLoginFilter but with cookie established. So in next request, we can perform agent validation against OpenSSO server
- Parameters:
httpRequest-httpResponse-- Returns:
- true if parameter LARES with message from CDC is present in HttpServletRequest
- Throws:
IOException
-
validateCDMessageContext
protected void validateCDMessageContext(javax.servlet.http.HttpServletRequest httpRequest, org.gatein.sso.agent.opensso.CDMessageContext context)Validation of various criterias inCDMessageContext- Parameters:
httpRequest-context-
-
loadAttributes
protected Properties loadAttributes(String response) throws Exception
- Throws:
Exception
-
-