Class OAuthServerResponse

java.lang.Object
com.revetsec.oauth.server.OAuthServerResponse

@Immutable public final class OAuthServerResponse extends Object
An immutable, bounded response prepared by the authorization server. Credential emission is explicit; ordinary headers exclude Location. Instances retain identity equality and fixed redacted diagnostics. Applications may add their own browser cookies at the HTTP edge.
Since:
1.0.0
  • Method Details

    • getStatusCode

      @CheckReturnValue public @NonNull Integer getStatusCode()
      Returns the HTTP status code.
      Returns:
      the HTTP status code
      Since:
      1.0.0
    • getHeaders

      Returns immutable ordinary headers; credential-bearing Location is separate.
      Returns:
      immutable response headers, excluding Location
      Since:
      1.0.0
    • getLocationWithCredentials

      Returns the optional credential-bearing redirect for HTTP emission.
      Returns:
      the optional credential-bearing redirect; use only for HTTP emission
      Since:
      1.0.0
    • toHttpBodyWithCredentials

      @CheckReturnValue public byte @NonNull [] toHttpBodyWithCredentials()
      Emits a defensive bounded HTTP body copy that may contain credentials or personal data.
      Returns:
      a defensive copy of the bounded HTTP body, which may contain credentials or personal data
      Since:
      1.0.0
    • toString

      Returns a fixed description that omits response contents.
      Overrides:
      toString in class Object
      Returns:
      a fixed description that omits response contents
      Since:
      1.0.0