Class OAuth2Bearer

java.lang.Object
com.tremolosecurity.proxy.auth.oauth2.OAuth2Bearer
All Implemented Interfaces:
AuthMechanism
Direct Known Subclasses:
OAuth2BearerLastMile, OAuth2JWT, OAuth2K8sServiceAccount

public abstract class OAuth2Bearer extends Object implements AuthMechanism
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doDelete(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as)
     
    void
    doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as)
     
    void
    doHead(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as)
     
    void
    doOptions(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as)
     
    void
    doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as)
     
    void
    doPut(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as)
     
     
    getFinalURL(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
     
    void
    init(jakarta.servlet.ServletContext ctx, HashMap<String, Attribute> init)
     
    abstract void
    processToken(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as, jakarta.servlet.http.HttpSession session, HashMap<String, Attribute> authParams, AuthChainType act, String realmName, String scope, ConfigManager cfg, String lmToken)
     
    protected void
    sendFail(jakarta.servlet.http.HttpServletResponse response, String realmName, String scope, String error, String errorDesc, boolean sendFail, List<org.apache.http.Header> corsHeaders)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • OAuth2Bearer

      public OAuth2Bearer()
  • Method Details

    • getConfigManager

      public ConfigManager getConfigManager()
    • init

      public void init(jakarta.servlet.ServletContext ctx, HashMap<String, Attribute> init)
      Specified by:
      init in interface AuthMechanism
    • getFinalURL

      public String getFinalURL(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Specified by:
      getFinalURL in interface AuthMechanism
    • doGet

      public void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doGet in interface AuthMechanism
      Throws:
      IOException
      jakarta.servlet.ServletException
    • processToken

      public abstract void processToken(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as, jakarta.servlet.http.HttpSession session, HashMap<String, Attribute> authParams, AuthChainType act, String realmName, String scope, ConfigManager cfg, String lmToken) throws jakarta.servlet.ServletException, IOException
      Throws:
      jakarta.servlet.ServletException
      IOException
    • sendFail

      protected void sendFail(jakarta.servlet.http.HttpServletResponse response, String realmName, String scope, String error, String errorDesc, boolean sendFail, List<org.apache.http.Header> corsHeaders) throws IOException
      Throws:
      IOException
    • doPost

      public void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doPost in interface AuthMechanism
      Throws:
      IOException
      jakarta.servlet.ServletException
    • doPut

      public void doPut(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doPut in interface AuthMechanism
      Throws:
      IOException
      jakarta.servlet.ServletException
    • doHead

      public void doHead(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doHead in interface AuthMechanism
      Throws:
      IOException
      jakarta.servlet.ServletException
    • doOptions

      public void doOptions(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doOptions in interface AuthMechanism
      Throws:
      IOException
      jakarta.servlet.ServletException
    • doDelete

      public void doDelete(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthStep as) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doDelete in interface AuthMechanism
      Throws:
      IOException
      jakarta.servlet.ServletException