Class OAuthHttpSecuritySupport.Validation
java.lang.Object
org.apache.camel.http.base.OAuthHttpSecuritySupport.Validation
- Enclosing class:
OAuthHttpSecuritySupport
OAuth validation state for an incoming HTTP request.
- Since:
- 4.21
-
Method Summary
Modifier and TypeMethodDescriptionauthenticated(org.apache.camel.spi.OAuthTokenValidationResult validationResult) Creates authenticated validation state.intGets the HTTP rejection status code.Gets the rejection response body, or null for authenticated requests.org.apache.camel.spi.OAuthTokenValidationResultGets the token validation result for authenticated requests, or null for rejected requests.Gets theWWW-Authenticatechallenge value, or null when none should be sent.Creates bad-request validation state for malformed OAuth request syntax.Creates unauthorized validation state for invalid tokens.booleanWhether validation succeeded.Creates service-unavailable validation state for validation infrastructure failures.Creates unauthorized validation state.
-
Method Details
-
authenticated
public static OAuthHttpSecuritySupport.Validation authenticated(org.apache.camel.spi.OAuthTokenValidationResult validationResult) Creates authenticated validation state. -
invalidRequest
Creates bad-request validation state for malformed OAuth request syntax. -
unauthorized
Creates unauthorized validation state. -
invalidToken
Creates unauthorized validation state for invalid tokens. -
isAuthenticated
public boolean isAuthenticated()Whether validation succeeded. -
getRejectionStatusCode
public int getRejectionStatusCode()Gets the HTTP rejection status code.- Throws:
IllegalStateException- whenisAuthenticated()is true
-
getWwwAuthenticate
Gets theWWW-Authenticatechallenge value, or null when none should be sent. -
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.
-