Token updates

This commit is contained in:
michaelpede 2021-04-20 12:00:22 -07:00
parent 05ebf0d453
commit 839559215b
4 changed files with 15 additions and 6 deletions

View File

@ -14,7 +14,7 @@ public class LookupDefinition extends ResourceInfo
public LookupDefinition()
{
this.tableName = "lookup";
this.resourcesName = "Lookups";
this.resourcesName = "Lookup";
this.resourceName = "Lookup";
}

View File

@ -1,6 +1,7 @@
package org.reso.service.servlet;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import org.reso.service.security.providers.BearerAuthProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -3,7 +3,9 @@ package org.reso.service.servlet.util;
public class SimpleError
{
String error;
private String error;
// Constants for standard errors.
static public String AUTH_REQUIRED = "auth_required";
static public String INVALID_REQUEST = "invalid_request";
@ -13,7 +15,7 @@ public class SimpleError
this.error = error;
}
// Accessor, used by ObjectMapper to serialize the error.
public String getError()
{
return error;

View File

@ -1,12 +1,16 @@
package org.reso.service.servlet.util;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Token
{
String accessToken;
String tokenType;
String scope;
// One must conform to the snake case naming convention for JSON representation of these properties
@JsonProperty("access_token")
private String accessToken;
@JsonProperty("token_type")
private String tokenType;
private String scope;
public Token(String authBearerToken, String tokenType, String scope)
@ -50,6 +54,8 @@ public class Token
}
// Accessors, used by ObjectMapper to serialize the token.
public String getAccessToken()
{
return accessToken;