mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing more dynamic authentication related issues
This commit is contained in:
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…
Reference in New Issue
Block a user