changed name of clientAuthorization to authorizationRequest (which is more accurate), closes #697
parent
a1228d19b5
commit
ba97fcb88a
|
@ -207,8 +207,8 @@ public class MITREidDataService_1_2 extends MITREidDataService_1_X {
|
||||||
writer.name("ownerId").value(holder.getOwnerId());
|
writer.name("ownerId").value(holder.getOwnerId());
|
||||||
writer.name("authentication");
|
writer.name("authentication");
|
||||||
writer.beginObject();
|
writer.beginObject();
|
||||||
|
writer.name("authorizationRequest");
|
||||||
OAuth2Authentication oa2Auth = holder.getAuthentication();
|
OAuth2Authentication oa2Auth = holder.getAuthentication();
|
||||||
writer.name("clientAuthorization");
|
|
||||||
writeAuthorizationRequest(oa2Auth.getOAuth2Request(), writer);
|
writeAuthorizationRequest(oa2Auth.getOAuth2Request(), writer);
|
||||||
String userAuthentication = base64UrlEncodeObject(oa2Auth.getUserAuthentication());
|
String userAuthentication = base64UrlEncodeObject(oa2Auth.getUserAuthentication());
|
||||||
writer.name("userAuthentication").value(userAuthentication);
|
writer.name("userAuthentication").value(userAuthentication);
|
||||||
|
@ -658,7 +658,7 @@ public class MITREidDataService_1_2 extends MITREidDataService_1_X {
|
||||||
//not needed
|
//not needed
|
||||||
reader.skipValue();
|
reader.skipValue();
|
||||||
} else if (name.equals("authentication")) {
|
} else if (name.equals("authentication")) {
|
||||||
OAuth2Request clientAuthorization = null;
|
OAuth2Request authorizationRequest = null;
|
||||||
Authentication userAuthentication = null;
|
Authentication userAuthentication = null;
|
||||||
reader.beginObject();
|
reader.beginObject();
|
||||||
while (reader.hasNext()) {
|
while (reader.hasNext()) {
|
||||||
|
@ -667,8 +667,8 @@ public class MITREidDataService_1_2 extends MITREidDataService_1_X {
|
||||||
continue;
|
continue;
|
||||||
case NAME:
|
case NAME:
|
||||||
String subName = reader.nextName();
|
String subName = reader.nextName();
|
||||||
if (subName.equals("clientAuthorization")) {
|
if (subName.equals("authorizationRequest")) {
|
||||||
clientAuthorization = readAuthorizationRequest(reader);
|
authorizationRequest = readAuthorizationRequest(reader);
|
||||||
} else if (subName.equals("userAuthentication")) {
|
} else if (subName.equals("userAuthentication")) {
|
||||||
if (reader.peek() == JsonToken.NULL) {
|
if (reader.peek() == JsonToken.NULL) {
|
||||||
reader.skipValue();
|
reader.skipValue();
|
||||||
|
@ -688,7 +688,7 @@ public class MITREidDataService_1_2 extends MITREidDataService_1_X {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reader.endObject();
|
reader.endObject();
|
||||||
OAuth2Authentication auth = new OAuth2Authentication(clientAuthorization, userAuthentication);
|
OAuth2Authentication auth = new OAuth2Authentication(authorizationRequest, userAuthentication);
|
||||||
ahe.setAuthentication(auth);
|
ahe.setAuthentication(auth);
|
||||||
} else {
|
} else {
|
||||||
logger.debug("Found unexpected entry");
|
logger.debug("Found unexpected entry");
|
||||||
|
|
|
@ -1477,9 +1477,9 @@ public class TestMITREidDataService_1_2 {
|
||||||
"\"" + MITREidDataService.SYSTEMSCOPES + "\": [], " +
|
"\"" + MITREidDataService.SYSTEMSCOPES + "\": [], " +
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [" +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"authentication\":{\"clientAuthorization\":{\"clientId\":\"client1\",\"redirectUri\":\"http://foo.com\"},"
|
"{\"id\":1,\"authentication\":{\"authorizationRequest\":{\"clientId\":\"client1\",\"redirectUri\":\"http://foo.com\"},"
|
||||||
+ "\"userAuthentication\":null}}," +
|
+ "\"userAuthentication\":null}}," +
|
||||||
"{\"id\":2,\"authentication\":{\"clientAuthorization\":{\"clientId\":\"client2\",\"redirectUri\":\"http://bar.com\"},"
|
"{\"id\":2,\"authentication\":{\"authorizationRequest\":{\"clientId\":\"client2\",\"redirectUri\":\"http://bar.com\"},"
|
||||||
+ "\"userAuthentication\":null}}" +
|
+ "\"userAuthentication\":null}}" +
|
||||||
" ]" +
|
" ]" +
|
||||||
"}";
|
"}";
|
||||||
|
@ -1752,9 +1752,9 @@ public class TestMITREidDataService_1_2 {
|
||||||
"\"" + MITREidDataService.BLACKLISTEDSITES + "\": [], " +
|
"\"" + MITREidDataService.BLACKLISTEDSITES + "\": [], " +
|
||||||
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [" +
|
"\"" + MITREidDataService.AUTHENTICATIONHOLDERS + "\": [" +
|
||||||
|
|
||||||
"{\"id\":1,\"authentication\":{\"clientAuthorization\":{\"clientId\":\"client1\",\"redirectUri\":\"http://foo.com\"},"
|
"{\"id\":1,\"authentication\":{\"authorizationRequest\":{\"clientId\":\"client1\",\"redirectUri\":\"http://foo.com\"},"
|
||||||
+ "\"userAuthentication\":null}}," +
|
+ "\"userAuthentication\":null}}," +
|
||||||
"{\"id\":2,\"authentication\":{\"clientAuthorization\":{\"clientId\":\"client2\",\"redirectUri\":\"http://bar.com\"},"
|
"{\"id\":2,\"authentication\":{\"authorizationRequest\":{\"clientId\":\"client2\",\"redirectUri\":\"http://bar.com\"},"
|
||||||
+ "\"userAuthentication\":null}}" +
|
+ "\"userAuthentication\":null}}" +
|
||||||
" ]," +
|
" ]," +
|
||||||
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
"\"" + MITREidDataService.REFRESHTOKENS + "\": [" +
|
||||||
|
|
Loading…
Reference in New Issue