Class OAuthHttpSecuritySupport.Validation

java.lang.Object
org.apache.camel.http.base.OAuthHttpSecuritySupport.Validation
Enclosing class:
OAuthHttpSecuritySupport

public static final class OAuthHttpSecuritySupport.Validation extends Object
OAuth validation state for an incoming HTTP request.
Since:
4.21
  • Method Details

    • authenticated

      public static OAuthHttpSecuritySupport.Validation authenticated(org.apache.camel.spi.OAuthTokenValidationResult validationResult)
      Creates authenticated validation state.
    • invalidRequest

      public static OAuthHttpSecuritySupport.Validation invalidRequest()
      Creates bad-request validation state for malformed OAuth request syntax.
    • unauthorized

      public static OAuthHttpSecuritySupport.Validation unauthorized()
      Creates unauthorized validation state.
    • invalidToken

      public static OAuthHttpSecuritySupport.Validation invalidToken()
      Creates unauthorized validation state for invalid tokens.
    • serviceUnavailable

      public static OAuthHttpSecuritySupport.Validation serviceUnavailable()
      Creates service-unavailable validation state for validation infrastructure failures.
    • isAuthenticated

      public boolean isAuthenticated()
      Whether validation succeeded.
    • getRejectionStatusCode

      public int getRejectionStatusCode()
      Gets the HTTP rejection status code.
      Throws:
      IllegalStateException - when isAuthenticated() is true
    • getWwwAuthenticate

      public String getWwwAuthenticate()
      Gets the WWW-Authenticate challenge value, or null when none should be sent.
    • getResponseBody

      public String getResponseBody()
      Gets the rejection response body, or null for authenticated requests.
    • getValidationResult

      public org.apache.camel.spi.OAuthTokenValidationResult getValidationResult()
      Gets the token validation result for authenticated requests, or null for rejected requests.