|
|
@ -117,7 +117,7 @@ public class DynamicClientWebAppRegistrationManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void initiateDynamicClientRegistration() {
|
|
|
|
public void initiateDynamicClientRegistration() {
|
|
|
|
String requiredDynamicClientRegistration, webAppName;
|
|
|
|
String requiredDynamicClientRegistration, webAppName, serviceProviderName;
|
|
|
|
ServletContext servletContext;
|
|
|
|
ServletContext servletContext;
|
|
|
|
RegistrationProfile registrationProfile;
|
|
|
|
RegistrationProfile registrationProfile;
|
|
|
|
OAuthAppDetails oAuthAppDetails;
|
|
|
|
OAuthAppDetails oAuthAppDetails;
|
|
|
@ -131,15 +131,15 @@ public class DynamicClientWebAppRegistrationManager {
|
|
|
|
while (enumeration.hasMoreElements()) {
|
|
|
|
while (enumeration.hasMoreElements()) {
|
|
|
|
oAuthAppDetails = new OAuthAppDetails();
|
|
|
|
oAuthAppDetails = new OAuthAppDetails();
|
|
|
|
webAppName = (String) enumeration.nextElement();
|
|
|
|
webAppName = (String) enumeration.nextElement();
|
|
|
|
|
|
|
|
serviceProviderName = DynamicClientWebAppRegistrationUtil.getUserName() + "_" + webAppName;
|
|
|
|
servletContext = DynamicClientWebAppRegistrationManager.webAppContexts.get(webAppName);
|
|
|
|
servletContext = DynamicClientWebAppRegistrationManager.webAppContexts.get(webAppName);
|
|
|
|
requiredDynamicClientRegistration = servletContext.getInitParameter(
|
|
|
|
requiredDynamicClientRegistration = servletContext.getInitParameter(
|
|
|
|
DynamicClientWebAppRegistrationConstants.DYNAMIC_CLIENT_REQUIRED_FLAG);
|
|
|
|
DynamicClientWebAppRegistrationConstants.DYNAMIC_CLIENT_REQUIRED_FLAG);
|
|
|
|
//Java web-app section
|
|
|
|
//Java web-app section
|
|
|
|
if ((requiredDynamicClientRegistration != null) && (Boolean.
|
|
|
|
if ((requiredDynamicClientRegistration != null) && (Boolean.parseBoolean(
|
|
|
|
parseBoolean(
|
|
|
|
|
|
|
|
requiredDynamicClientRegistration))) {
|
|
|
|
requiredDynamicClientRegistration))) {
|
|
|
|
//Check whether this is an already registered application
|
|
|
|
//Check whether this is an already registered application
|
|
|
|
if (!dynamicClientWebAppRegistrationManager.isRegisteredOAuthApplication(webAppName)) {
|
|
|
|
if (!dynamicClientWebAppRegistrationManager.isRegisteredOAuthApplication(serviceProviderName)) {
|
|
|
|
//Construct the RegistrationProfile
|
|
|
|
//Construct the RegistrationProfile
|
|
|
|
registrationProfile = DynamicClientWebAppRegistrationUtil.
|
|
|
|
registrationProfile = DynamicClientWebAppRegistrationUtil.
|
|
|
|
constructRegistrationProfile(servletContext, webAppName);
|
|
|
|
constructRegistrationProfile(servletContext, webAppName);
|
|
|
@ -155,7 +155,7 @@ public class DynamicClientWebAppRegistrationManager {
|
|
|
|
JaggeryOAuthConfigurationSettings jaggeryOAuthConfigurationSettings =
|
|
|
|
JaggeryOAuthConfigurationSettings jaggeryOAuthConfigurationSettings =
|
|
|
|
DynamicClientWebAppRegistrationUtil.getJaggeryAppOAuthSettings(servletContext);
|
|
|
|
DynamicClientWebAppRegistrationUtil.getJaggeryAppOAuthSettings(servletContext);
|
|
|
|
if (jaggeryOAuthConfigurationSettings.isRequireDynamicClientRegistration()) {
|
|
|
|
if (jaggeryOAuthConfigurationSettings.isRequireDynamicClientRegistration()) {
|
|
|
|
if (!dynamicClientWebAppRegistrationManager.isRegisteredOAuthApplication(webAppName)) {
|
|
|
|
if (!dynamicClientWebAppRegistrationManager.isRegisteredOAuthApplication(serviceProviderName)) {
|
|
|
|
registrationProfile = DynamicClientWebAppRegistrationUtil.
|
|
|
|
registrationProfile = DynamicClientWebAppRegistrationUtil.
|
|
|
|
constructRegistrationProfile(jaggeryOAuthConfigurationSettings,
|
|
|
|
constructRegistrationProfile(jaggeryOAuthConfigurationSettings,
|
|
|
|
webAppName);
|
|
|
|
webAppName);
|
|
|
|