missed a few applicationName references, fixed API JSON rendering

pull/263/head
Justin Richer 2012-12-11 15:16:18 -05:00
parent dfd8e9c7c7
commit 6344a72519
4 changed files with 8 additions and 11 deletions

View File

@ -822,7 +822,7 @@ public class ClientDetailsEntity implements ClientDetails {
+ additionalInformation + ", " : "") + additionalInformation + ", " : "")
+ (applicationType != null ? "applicationType=" + (applicationType != null ? "applicationType="
+ applicationType + ", " : "") + applicationType + ", " : "")
+ (clientName != null ? "applicationName=" + (clientName != null ? "clientName="
+ clientName + ", " : "") + clientName + ", " : "")
+ (tokenEndpointAuthType != null ? "tokenEndpointAuthType=" + (tokenEndpointAuthType != null ? "tokenEndpointAuthType="
+ tokenEndpointAuthType + ", " : "") + tokenEndpointAuthType + ", " : "")

View File

@ -66,12 +66,8 @@ public class ClientRegistrationView extends AbstractView {
if (token != null) { if (token != null) {
obj.addProperty("registration_access_token", token.getValue()); obj.addProperty("registration_access_token", token.getValue());
if (token.getExpiration() != null) {
obj.addProperty("expires_at", token.getExpiration().getTime()); // TODO: make sure this makes sense?
} else {
obj.addProperty("expires_at", 0); // TODO: configure expiring client secrets. For now, they don't expire obj.addProperty("expires_at", 0); // TODO: configure expiring client secrets. For now, they don't expire
} }
}
Writer out = response.getWriter(); Writer out = response.getWriter();
gson.toJson(obj, out); gson.toJson(obj, out);

View File

@ -49,6 +49,7 @@ public class JsonEntityView extends AbstractView {
} }
}) })
.serializeNulls()
.setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ") .setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
.create(); .create();

View File

@ -41,14 +41,14 @@
</c:choose> </c:choose>
Do you authorize Do you authorize
"<c:choose> "<c:choose>
<c:when test="${empty client.applicationName}"> <c:when test="${empty client.clientName}">
<c:out value="${client.clientId}"/> <c:out value="${client.clientId}"/>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<c:out value="${client.applicationName}"/> <c:out value="${client.clientName}"/>
</c:otherwise> </c:otherwise>
</c:choose>" to sign you into their site </c:choose>"
using your identity? to sign you into their site using your identity?
<div> <div>
<a class="small" href="#" onclick="$('#description').toggle('fast'); return false;">more information</a> <a class="small" href="#" onclick="$('#description').toggle('fast'); return false;">more information</a>
</div> </div>