Deleted 403 response code and now also comparing port on login.
This commit is contained in:
@ -1,39 +0,0 @@
|
||||
package com.mesacarlos.webconsole.json;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
public class Forbidden implements JSONOutput{
|
||||
private String message;
|
||||
private String respondsTo;
|
||||
|
||||
public Forbidden(String message, String respondsTo) {
|
||||
this.message = message;
|
||||
this.respondsTo = respondsTo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStatusCode() {
|
||||
return 403;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRespondsTo() {
|
||||
return respondsTo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toJSON() {
|
||||
JsonObject object = new JsonObject();
|
||||
object.addProperty("status", getStatusCode());
|
||||
object.addProperty("statusDescription", "Forbidden");
|
||||
object.addProperty("respondsTo", getRespondsTo());
|
||||
object.addProperty("message", getMessage());
|
||||
return object.toString();
|
||||
}
|
||||
|
||||
}
|
@ -6,6 +6,10 @@ public class Processed implements JSONOutput{
|
||||
private String message;
|
||||
private String respondsTo;
|
||||
|
||||
public Processed(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Processed(String message, String respondsTo) {
|
||||
this.message = message;
|
||||
this.respondsTo = respondsTo;
|
||||
|
Reference in New Issue
Block a user