Package io.asgardeo.java.oidc.sdk
Class HTTPSessionBasedOIDCProcessor
- java.lang.Object
-
- io.asgardeo.java.oidc.sdk.HTTPSessionBasedOIDCProcessor
-
public class HTTPSessionBasedOIDCProcessor extends Object
A wrapper class for theDefaultOIDCManagerthat provides the functionality defined by theOIDCManagerwith using HTTP sessions as the storage entity for theRequestContextandSessionContextinformation.
-
-
Constructor Summary
Constructors Constructor Description HTTPSessionBasedOIDCProcessor(OIDCAgentConfig oidcAgentConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleOIDCCallback(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Processes the OIDC callback response and extract the authorization code, builds a token request, sends the token request and parse the token response where the authenticated user info and tokens would be added to theSessionContextobject and written into the available http session.voidlogout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Builds a logout request and redirects.voidsendForLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Builds an authentication request and redirects.
-
-
-
Constructor Detail
-
HTTPSessionBasedOIDCProcessor
public HTTPSessionBasedOIDCProcessor(OIDCAgentConfig oidcAgentConfig) throws SSOAgentClientException
- Throws:
SSOAgentClientException
-
-
Method Detail
-
sendForLogin
public void sendForLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws SSOAgentExceptionBuilds an authentication request and redirects. Information regarding the authentication session would be retrieved viaRequestContextobject and then, would be written to the http session.- Parameters:
request- IncomingHttpServletRequest.response- OutgoingHttpServletResponse.- Throws:
SSOAgentException
-
handleOIDCCallback
public void handleOIDCCallback(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws SSOAgentExceptionProcesses the OIDC callback response and extract the authorization code, builds a token request, sends the token request and parse the token response where the authenticated user info and tokens would be added to theSessionContextobject and written into the available http session.- Parameters:
request- IncomingHttpServletRequest.response- OutgoingHttpServletResponse.- Throws:
SSOAgentException- Upon failed authentication.
-
logout
public void logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws SSOAgentExceptionBuilds a logout request and redirects.- Parameters:
request- IncomingHttpServletRequest.response- OutgoingHttpServletResponse- Throws:
SSOAgentException
-
-