Class OmpassCallbackAction

java.lang.Object
io.jenkins.plugins.ompass.OmpassCallbackAction
All Implemented Interfaces:
ExtensionPoint, Action, ModelObject, RootAction, UnprotectedRootAction

@Extension public class OmpassCallbackAction extends Object implements 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.
  • Constructor Details

    • OmpassCallbackAction

      public OmpassCallbackAction()
  • Method Details

    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • isSuccess

      public boolean isSuccess()
    • getErrorMessage

      public String getErrorMessage()
    • getUsername

      public String getUsername()
    • getRelayState

      public String 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:
      IOException
      jakarta.servlet.ServletException