// Path: authrite-service/src/main/java/com/lewisd/authrite/errors/APIError.java
// public class APIError {
//     private final String[] errors;
// 
//     @JsonCreator
//     public APIError(@JsonProperty("errors") final String... errors) {
//         this.errors = clone(errors);
//     }
// 
//     @JsonProperty
//     public String[] getErrors() {
//         return clone(errors);
//     }
// 
//     private static String[] clone(final String[] array) {
//         return Arrays.copyOf(array, array.length);
//     }
// 
// }


import com.lewisd.authrite.errors.APIError;
import io.dropwizard.auth.UnauthorizedHandler;
import javax.ws.rs.core.Response;
package com.lewisd.authrite.auth;



public class DefaultUnauthorizedHandler implements UnauthorizedHandler {

    @Override
    public Response buildResponse(final String prefix, final String realm) {
        return Response.status(Response.Status.UNAUTHORIZED)
// Path: authrite-service/src/main/java/com/lewisd/authrite/errors/APIError.java
// public class APIError {
//     private final String[] errors;
// 
//     @JsonCreator
//     public APIError(@JsonProperty("errors") final String... errors) {
//         this.errors = clone(errors);
//     }
// 
//     @JsonProperty
//     public String[] getErrors() {
//         return clone(errors);
//     }
// 
//     private static String[] clone(final String[] array) {
//         return Arrays.copyOf(array, array.length);
//     }
// 
// }


// Path: authrite-service/src/main/java/com/lewisd/authrite/auth/DefaultUnauthorizedHandler.java
import com.lewisd.authrite.errors.APIError;
import io.dropwizard.auth.UnauthorizedHandler;
import javax.ws.rs.core.Response;

package com.lewisd.authrite.auth;



public class DefaultUnauthorizedHandler implements UnauthorizedHandler {

    @Override
    public Response buildResponse(final String prefix, final String realm) {
        return Response.status(Response.Status.UNAUTHORIZED)
                .entity(new APIError("Credentials are required to access this resource."))