Package net.ltgt.oidc.servlet
Class CallbackServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
net.ltgt.oidc.servlet.CallbackServlet
- All Implemented Interfaces:
Servlet,ServletConfig,Serializable
Implements the OpenID Connect Redirect URI for the authorization code
flow.
A Configuration instance must have been added as a ServletContext attribute under the name Configuration.CONTEXT_ATTRIBUTE_NAME.
Authentication state must have been put in the session by an AuthenticationRedirector (generally through the LoginServlet or an
authorization filter).
After validating the request, and if authentication was successful, the user will be redirected to the page stored in the authentication state.
- See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoGet(HttpServletRequest req, HttpServletResponse resp) protected voiddoPost(HttpServletRequest req, HttpServletResponse resp) voidinit()protected voidsendError(HttpServletResponse resp, int statusCode, String message, @Nullable Throwable cause) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, init, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Constructor Details
-
CallbackServlet
public CallbackServlet()
-
-
Method Details
-
init
- Overrides:
initin classGenericServlet- Throws:
ServletException
-
doGet
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException - Overrides:
doGetin classHttpServlet- Throws:
ServletExceptionIOException
-
doPost
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException - Overrides:
doPostin classHttpServlet- Throws:
ServletExceptionIOException
-
sendError
@ForOverride protected void sendError(HttpServletResponse resp, int statusCode, String message, @Nullable Throwable cause) throws IOException, ServletException - Throws:
IOExceptionServletException
-