com.holonplatform.jaxrs.server.internal

## Class ResponseUtils

- java.lang.Object
- - com.holonplatform.jaxrs.server.internal.ResponseUtils

- All Implemented Interfaces:
    Serializable

      public final class ResponseUtils
      extends Object
      implements Serializable

  Utility class to handle responses.
  Since:
    5.0.0
  See Also:
    Serialized Form

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static javax.ws.rs.core.Response` | `buildAuthenticationErrorResponse(com.holonplatform.auth.AuthenticationError error, String realmName)` Build an authentication error response using given `AuthenticationError`.
    `static javax.ws.rs.core.Response` | `buildAuthenticationErrorResponse(String[] schemes, String errorCode, String errorDescription, int statusCode, String realmName)` Build an authentication error response

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### buildAuthenticationErrorResponse

          public static javax.ws.rs.core.Response buildAuthenticationErrorResponse(com.holonplatform.auth.AuthenticationError error,
                                                                                   String realmName)

      Build an authentication error response using given `AuthenticationError`.
      Parameters:
        `error` - AuthenticationError
        `realmName` - Optional realm name
      Returns:
        Authentication error response

    - #### buildAuthenticationErrorResponse

          public static javax.ws.rs.core.Response buildAuthenticationErrorResponse(String[] schemes,
                                                                                   String errorCode,
                                                                                   String errorDescription,
                                                                                   int statusCode,
                                                                                   String realmName)

      Build an authentication error response
      Parameters:
        `schemes` - Optional allowed authentication schemes
        `errorCode` - Optional error code
        `errorDescription` - Optional error description
        `statusCode` - HTTP status code
        `realmName` - Optional realm name
      Returns:
        Authentication error response

Copyright © 2019 The Holon Platform. All rights reserved.