Package io.jenkins.plugins.ompass
Class OmpassCallbackAction
java.lang.Object
io.jenkins.plugins.ompass.OmpassCallbackAction
- All Implemented Interfaces:
ExtensionPoint,Action,ModelObject,RootAction,UnprotectedRootAction
RootAction that handles the OMPASS authentication callback.
When a user completes 2FA through OMPASS, the OMPASS server redirects to this callback
with an authentication token. This action verifies the token, marks the user's session
as 2FA-verified, and redirects to the original page.
On failure, an error message is displayed via the Jelly view.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoIndex(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Handles the callback from the OMPASS server.booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.RootAction
getBadge, isPrimaryAction
-
Constructor Details
-
OmpassCallbackAction
public OmpassCallbackAction()
-
-
Method Details
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
isSuccess
public boolean isSuccess() -
getErrorMessage
-
getUsername
-
getRelayState
-
doIndex
public void doIndex(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Handles the callback from the OMPASS server. Validates the token and username parameters, verifies them against the OMPASS server, marks the session as 2FA-verified on success and redirects to the original page, or displays an error page on failure.- Throws:
IOExceptionjakarta.servlet.ServletException
-