added in better default checks for content negotiation
parent
3412c1877e
commit
538c4031bb
|
@ -105,7 +105,9 @@ public class UserInfoEndpoint {
|
||||||
|| client.getUserInfoEncryptedResponseEnc() != null) {
|
|| client.getUserInfoEncryptedResponseEnc() != null) {
|
||||||
// client has a preference, see if they ask for plain JSON specifically on this request
|
// client has a preference, see if they ask for plain JSON specifically on this request
|
||||||
for (MediaType m : mediaTypes) {
|
for (MediaType m : mediaTypes) {
|
||||||
if (!m.isWildcardType() && m.isCompatibleWith(MediaType.APPLICATION_JSON)) {
|
if (!m.isWildcardType() && m.isCompatibleWith(JOSE_MEDIA_TYPE)) {
|
||||||
|
return "userInfoJwtView";
|
||||||
|
} else if (!m.isWildcardType() && m.isCompatibleWith(MediaType.APPLICATION_JSON)) {
|
||||||
return "userInfoView";
|
return "userInfoView";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +117,9 @@ public class UserInfoEndpoint {
|
||||||
} else {
|
} else {
|
||||||
// client has no preference, see if they asked for JWT specifically on this request
|
// client has no preference, see if they asked for JWT specifically on this request
|
||||||
for (MediaType m : mediaTypes) {
|
for (MediaType m : mediaTypes) {
|
||||||
if (!m.isWildcardType() && m.isCompatibleWith(JOSE_MEDIA_TYPE)) {
|
if (!m.isWildcardType() && m.isCompatibleWith(MediaType.APPLICATION_JSON)) {
|
||||||
|
return "userInfoView";
|
||||||
|
} else if (!m.isWildcardType() && m.isCompatibleWith(JOSE_MEDIA_TYPE)) {
|
||||||
return "userInfoJwtView";
|
return "userInfoJwtView";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue