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
- Author:
- Sohil Shah
-
Field Summary
FieldsFields inherited from class org.gatein.sso.agent.GenericAgent
AUTHENTICATED_CREDENTIALS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 Details
-
IN_RESPONSE_TO_ATTR
- See Also:
-
-
Constructor Details
-
OpenSSOAgentImpl
public OpenSSOAgentImpl(org.exoplatform.container.xml.InitParams params)
-
-
Method Details
-
setCookieName
- Specified by:
setCookieNamein interfaceOpenSSOAgent
-
setServerUrl
- 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 IOException 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. 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-
-
isTokenValid
- Throws:
Exception
-
getSubject
- Throws:
Exception
-
loadAttributes
- Throws:
Exception
-