Class ServletOAuth

java.lang.Object
com.revetsec.servlet.jakarta.ServletOAuth

@ThreadSafe public final class ServletOAuth extends Object
Raw OAuth callback and redirect transport for application-routed Servlet endpoints. Parsing grants no identity; core completes the browser-bound authorization transaction.
Since:
1.0.0
  • Method Details

    • authorizationResponseResultFor

      @CheckReturnValue public static @NonNull ServletOAuthCallbackResult authorizationResponseResultFor(@NonNull jakarta.servlet.http.HttpServletRequest request) throws IOException
      Parses the original GET query or bounded POST form without Servlet parameter decoding. Other methods, including HEAD, return Rejected without reading query, headers or body. The application selects the HTTP response (for example, a route-level 405) and must not load or consume pending login state for that rejection.
      Parameters:
      request - application-routed callback request
      Returns:
      parsed, rejected or oversized callback outcome
      Throws:
      IOException - if the Servlet input stream fails
      Since:
      1.0.0
    • writeRedirect

      public static void writeRedirect(@NonNull jakarta.servlet.http.HttpServletResponse response, @NonNull URI location)
      Writes an application-approved absolute HTTP(S) redirect without Servlet URL rewriting. The application sets any browser-bound pending cookie before writing the response.
      Parameters:
      response - application-owned response
      location - trusted redirect destination
      Since:
      1.0.0