Fixing more dynamic authentication related issues

revert-70aa11f8
prabathabey 9 years ago
parent e909ac8bcc
commit 4e17a2669f

@ -33,6 +33,8 @@ public class RegistrationProfile {
private String[] contacts; private String[] contacts;
private String[] requestUris; private String[] requestUris;
private String owner; private String owner;
private String callbackUrl;
private String tokenScope;
public String getApplicationType() { public String getApplicationType() {
return applicationType; return applicationType;
@ -138,4 +140,20 @@ public class RegistrationProfile {
this.owner = owner; this.owner = owner;
} }
public String getCallbackUrl() {
return callbackUrl;
}
public void setCallbackUrl(String callbackUrl) {
this.callbackUrl = callbackUrl;
}
public String getTokenScope() {
return tokenScope;
}
public void setTokenScope(String tokenScope) {
this.tokenScope = tokenScope;
}
} }

@ -87,15 +87,9 @@ public class ClientRegistrationServiceImpl implements RegistrationService {
log.debug("Trying to create OAuth application: '" + applicationName + "'"); log.debug("Trying to create OAuth application: '" + applicationName + "'");
} }
String callBackURL = null; String callBackURL = profile.getCallbackUrl();
if (oAuthApplicationInfo.getParameter("callback_url") != null) {
JSONArray jsonArray = (JSONArray) oAuthApplicationInfo.getParameter("callback_url");
for (Object callbackUrlObject : jsonArray) {
callBackURL = (String) callbackUrlObject;
}
}
String tokenScope = (String) oAuthApplicationInfo.getParameter("tokenScope"); String tokenScope = profile.getTokenScope();
String tokenScopes[] = new String[1]; String tokenScopes[] = new String[1];
tokenScopes[0] = tokenScope; tokenScopes[0] = tokenScope;

Loading…
Cancel
Save