Token updates
This commit is contained in:
parent
05ebf0d453
commit
839559215b
|
@ -14,7 +14,7 @@ public class LookupDefinition extends ResourceInfo
|
||||||
public LookupDefinition()
|
public LookupDefinition()
|
||||||
{
|
{
|
||||||
this.tableName = "lookup";
|
this.tableName = "lookup";
|
||||||
this.resourcesName = "Lookups";
|
this.resourcesName = "Lookup";
|
||||||
this.resourceName = "Lookup";
|
this.resourceName = "Lookup";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package org.reso.service.servlet;
|
package org.reso.service.servlet;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
||||||
import org.reso.service.security.providers.BearerAuthProvider;
|
import org.reso.service.security.providers.BearerAuthProvider;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
|
@ -3,7 +3,9 @@ package org.reso.service.servlet.util;
|
||||||
|
|
||||||
public class SimpleError
|
public class SimpleError
|
||||||
{
|
{
|
||||||
String error;
|
private String error;
|
||||||
|
|
||||||
|
// Constants for standard errors.
|
||||||
static public String AUTH_REQUIRED = "auth_required";
|
static public String AUTH_REQUIRED = "auth_required";
|
||||||
static public String INVALID_REQUEST = "invalid_request";
|
static public String INVALID_REQUEST = "invalid_request";
|
||||||
|
|
||||||
|
@ -13,7 +15,7 @@ public class SimpleError
|
||||||
this.error = error;
|
this.error = error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Accessor, used by ObjectMapper to serialize the error.
|
||||||
public String getError()
|
public String getError()
|
||||||
{
|
{
|
||||||
return error;
|
return error;
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
package org.reso.service.servlet.util;
|
package org.reso.service.servlet.util;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
public class Token
|
public class Token
|
||||||
{
|
{
|
||||||
String accessToken;
|
// One must conform to the snake case naming convention for JSON representation of these properties
|
||||||
String tokenType;
|
@JsonProperty("access_token")
|
||||||
String scope;
|
private String accessToken;
|
||||||
|
@JsonProperty("token_type")
|
||||||
|
private String tokenType;
|
||||||
|
private String scope;
|
||||||
|
|
||||||
|
|
||||||
public Token(String authBearerToken, String tokenType, 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()
|
public String getAccessToken()
|
||||||
{
|
{
|
||||||
return accessToken;
|
return accessToken;
|
||||||
|
|
Loading…
Reference in New Issue