|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet com.atlassian.crowd.openid.client.servlet.OpenIDClientServlet
public class OpenIDClientServlet
OpenIDClientServlet acts as the proxy to handling OpenID authentication requests and responses. This servlet is called by either:
This design allows the application code to be separated from OpenID specific code. All the application needs to do is create an OpenIDAuthRequest, put it into the request, and forward control to this servlet.
The OpenID provider will take it's time to verify the authentication, eg. allow the user to login, select a profile, etc. Once this is complete, the OpenID server will asynchronously respond to the authentication request and will redirect an authentication response to this servlet.
This servlet will then recieve the response from the OpenID Provider, build an OpenIDAuthResponse object and forward ontrol back to the application. The application can process the OpenIDAuthResponse and create an OpenIDPrincipal from it if required.
The application will need to implement a Servlet/Action/etc to make the authentication request (eg. Login action) and one to process the authentication response (eg. LoginResponse action). It has been done this way for clarity, however, it could easily be refactored into one action.
Constructor Summary | |
---|---|
OpenIDClientServlet()
|
Method Summary | |
---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Forward to doPost(). |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
The servlet is used to both send requests and recieve responses. |
void |
init(javax.servlet.ServletConfig config)
Initialise the servlet to inject the CrowdConsumer from Spring. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OpenIDClientServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
config
- ServletConfig
javax.servlet.ServletException
protected void doGet(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
httpServletRequest
- httpServletRequesthttpServletResponse
- httpServletResponse
javax.servlet.ServletException
IOException
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPost
in class javax.servlet.http.HttpServlet
request
- httpServletRequestresponse
- httpServletResponse
javax.servlet.ServletException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |