private Property[] addUniqueIdProperty(Property [] properties) { if (ArrayUtils.isEmpty(properties)){ return new Property[0]; } String uuid = UUID.randomUUID().toString(); Property uniqueIdProperty = new Property(); uniqueIdProperty.setName(IdentityApplicationConstants.UNIQUE_ID_CONSTANT); uniqueIdProperty.setValue(uuid); if (log.isDebugEnabled()){ log.debug("Adding uniqueId property: " + uuid); } properties = (Property[]) ArrayUtils.add(properties, uniqueIdProperty); return properties; }
private Property[] addUniqueIdProperty(Property [] properties) { if (ArrayUtils.isEmpty(properties)){ return new Property[0]; } String uuid = UUID.randomUUID().toString(); Property uniqueIdProperty = new Property(); uniqueIdProperty.setName(IdentityApplicationConstants.UNIQUE_ID_CONSTANT); uniqueIdProperty.setValue(uuid); if (log.isDebugEnabled()){ log.debug("Adding uniqueId property: " + uuid); } properties = (Property[]) ArrayUtils.add(properties, uniqueIdProperty); return properties; }
Property property = new Property();
Property property = new Property();
@Override public Property[] getConfigurationProperties() { Property appType = new Property(); appType.setName(IdentityConstants.ServerConfig.WELLKNOWN_APPLICATION_TYPE); appType.setType("hidden"); appType.setValue(getConfigName()); appType.setDisplayName(IdentityConstants.ServerConfig.WELLKNOWN_APPLICATION_TYPE); Property service = new Property(); service.setName(CASSSOConstants.SERVICE_PROVIDER_ARGUMENT); service.setDisplayName(CASSSOConstants.CAS_SERVICE_URL); return new Property[]{appType, service}; }
/** * Get Configuration Properties * * @return */ @Override public List<Property> getConfigurationProperties() { List<Property> configProperties = new ArrayList<Property>(); Property oauthEndpoint = new Property(); oauthEndpoint.setDisplayName("Yahoo Authentication Endpoint"); oauthEndpoint.setName(YahooOpenIDAuthenticatorConstants.YAHOO_AUTHZ_URL); oauthEndpoint.setValue(IdentityApplicationConstants.YAHOO_AUTHZ_URL); oauthEndpoint.setDescription("Enter value corresponding to yahoo oauth endpoint."); oauthEndpoint.setDisplayOrder(1); configProperties.add(oauthEndpoint); return configProperties; }
@Override public List<Property> getConfigurationProperties() { List<Property> configProperties = new ArrayList<Property>(); Property callbackUrl = new Property(); callbackUrl.setDisplayName("Callback Url"); callbackUrl.setName(IdentityApplicationConstants.OAuth2.CALLBACK_URL); callbackUrl.setDescription("Enter value corresponding to callback url."); callbackUrl.setDisplayOrder(3); configProperties.add(callbackUrl); Property clientId = new Property(); clientId.setName(OIDCAuthenticatorConstants.CLIENT_ID); clientId.setDisplayName("Client Id"); clientId.setRequired(true); clientId.setDescription("Enter Microsoft Live client identifier value"); clientId.setDisplayOrder(1); configProperties.add(clientId); Property clientSecret = new Property(); clientSecret.setName(OIDCAuthenticatorConstants.CLIENT_SECRET); clientSecret.setDisplayName("Client Secret"); clientSecret.setRequired(true); clientSecret.setConfidential(true); clientSecret.setDescription("Enter Microsoft Live client secret value"); clientSecret.setDisplayOrder(2); configProperties.add(clientSecret); return configProperties; }
@Override public List<Property> getConfigurationProperties() { List<Property> configProperties = new ArrayList<Property>(); Property callbackUrl = new Property(); callbackUrl.setDisplayName("Callback Url"); callbackUrl.setName(IdentityApplicationConstants.OAuth2.CALLBACK_URL); callbackUrl.setDescription("Enter value corresponding to callback url."); callbackUrl.setDisplayOrder(3); configProperties.add(callbackUrl); Property clientId = new Property(); clientId.setName(OIDCAuthenticatorConstants.CLIENT_ID); clientId.setDisplayName("Client Id"); clientId.setRequired(true); clientId.setDescription("Enter Microsoft Live client identifier value"); clientId.setDisplayOrder(1); configProperties.add(clientId); Property clientSecret = new Property(); clientSecret.setName(OIDCAuthenticatorConstants.CLIENT_SECRET); clientSecret.setDisplayName("Client Secret"); clientSecret.setRequired(true); clientSecret.setConfidential(true); clientSecret.setDescription("Enter Microsoft Live client secret value"); clientSecret.setDisplayOrder(2); configProperties.add(clientSecret); return configProperties; }
@Override public List<Property> getConfigurationProperties() { List<Property> configProperties = new ArrayList<Property>(); Property callbackUrl = new Property(); callbackUrl.setDisplayName("Callback Url"); callbackUrl.setName(IdentityApplicationConstants.OAuth2.CALLBACK_URL); callbackUrl.setDescription("Enter value corresponding to callback url."); callbackUrl.setDisplayOrder(3); configProperties.add(callbackUrl); Property clientId = new Property(); clientId.setName(OIDCAuthenticatorConstants.CLIENT_ID); clientId.setDisplayName("Client Id"); clientId.setRequired(true); clientId.setDescription("Enter Microsoft Live client identifier value"); clientId.setDisplayOrder(1); configProperties.add(clientId); Property clientSecret = new Property(); clientSecret.setName(OIDCAuthenticatorConstants.CLIENT_SECRET); clientSecret.setDisplayName("Client Secret"); clientSecret.setRequired(true); clientSecret.setConfidential(true); clientSecret.setDescription("Enter Microsoft Live client secret value"); clientSecret.setDisplayOrder(2); configProperties.add(clientSecret); return configProperties; }
Property clientId = new Property(); clientId.setName(OIDCAuthenticatorConstants.CLIENT_ID); clientId.setDisplayName("Client Id"); configProperties.add(clientId); Property clientSecret = new Property(); clientSecret.setName(OIDCAuthenticatorConstants.CLIENT_SECRET); clientSecret.setDisplayName("Client Secret"); configProperties.add(clientSecret); Property callbackUrl = new Property(); callbackUrl.setDisplayName("Callback URL"); callbackUrl.setName(IdentityApplicationConstants.OAuth2.CALLBACK_URL);
Property clientId = new Property(); clientId.setName(OIDCAuthenticatorConstants.CLIENT_ID); clientId.setDisplayName("Client Id"); configProperties.add(clientId); Property clientSecret = new Property(); clientSecret.setName(OIDCAuthenticatorConstants.CLIENT_SECRET); clientSecret.setDisplayName("Client Secret"); configProperties.add(clientSecret); Property callbackUrl = new Property(); callbackUrl.setDisplayName("Callback URL"); callbackUrl.setName(IdentityApplicationConstants.OAuth2.CALLBACK_URL);
Property clientId = new Property(); clientId.setName(OIDCAuthenticatorConstants.CLIENT_ID); clientId.setDisplayName("Client Id"); configProperties.add(clientId); Property clientSecret = new Property(); clientSecret.setName(OIDCAuthenticatorConstants.CLIENT_SECRET); clientSecret.setDisplayName("Client Secret"); configProperties.add(clientSecret); Property callbackUrl = new Property(); callbackUrl.setDisplayName("Callback Url"); callbackUrl.setName(IdentityApplicationConstants.OAuth2.CALLBACK_URL); configProperties.add(callbackUrl); Property scope = new Property(); scope.setDisplayName("Additional Query Parameters"); scope.setName("AdditionalQueryParameters");
Property clientId = new Property(); clientId.setName(OIDCAuthenticatorConstants.CLIENT_ID); clientId.setDisplayName("Client Id"); configProperties.add(clientId); Property clientSecret = new Property(); clientSecret.setName(OIDCAuthenticatorConstants.CLIENT_SECRET); clientSecret.setDisplayName("Client Secret"); configProperties.add(clientSecret); Property callbackUrl = new Property(); callbackUrl.setDisplayName("Callback Url"); callbackUrl.setName(IdentityApplicationConstants.OAuth2.CALLBACK_URL); configProperties.add(callbackUrl); Property scope = new Property(); scope.setDisplayName("Additional Query Parameters"); scope.setName("AdditionalQueryParameters");
Property newProperty = new Property(); newProperty.setName(connectorProperty); newProperty.setDescription(list.get(i).getPropertyDescriptionMapping().get(connectorProperty));
/** * Get the configurations of a tenant from cache or database * * @param tenantDomain Domain name of the tenant * @return Configurations belong to the tenant */ private static Property[] getResidentIdpConfiguration(String tenantDomain) throws FrameworkException { IdpManager identityProviderManager = IdentityProviderManager.getInstance(); IdentityProvider residentIdp = null; try { residentIdp = identityProviderManager.getResidentIdP(tenantDomain); } catch (IdentityProviderManagementException e) { String errorMsg = String.format("Error while retrieving resident Idp for %s tenant.", tenantDomain); throw new FrameworkException(errorMsg, e); } IdentityProviderProperty[] identityMgtProperties = residentIdp.getIdpProperties(); Property[] configMap = new Property[identityMgtProperties.length]; int index = 0; for (IdentityProviderProperty identityMgtProperty : identityMgtProperties) { if (ALREADY_WRITTEN_PROPERTY.equals(identityMgtProperty.getName())) { continue; } Property property = new Property(); property.setName(identityMgtProperty.getName()); property.setValue(identityMgtProperty.getValue()); configMap[index] = property; index++; } return configMap; }
/** * Get the configurations of a tenant from cache or database * * @param tenantDomain Domain name of the tenant * @return Configurations belong to the tenant */ private static Property[] getResidentIdpConfiguration(String tenantDomain) throws FrameworkException { IdpManager identityProviderManager = IdentityProviderManager.getInstance(); IdentityProvider residentIdp = null; try { residentIdp = identityProviderManager.getResidentIdP(tenantDomain); } catch (IdentityProviderManagementException e) { String errorMsg = String.format("Error while retrieving resident Idp for %s tenant.", tenantDomain); throw new FrameworkException(errorMsg, e); } IdentityProviderProperty[] identityMgtProperties = residentIdp.getIdpProperties(); Property[] configMap = new Property[identityMgtProperties.length]; int index = 0; for (IdentityProviderProperty identityMgtProperty : identityMgtProperties) { if (ALREADY_WRITTEN_PROPERTY.equals(identityMgtProperty.getName())) { continue; } Property property = new Property(); property.setName(identityMgtProperty.getName()); property.setValue(identityMgtProperty.getValue()); configMap[index] = property; index++; } return configMap; }
continue; Property property = new Property(); property.setName(identityMgtProperty.getName()); property.setValue(identityMgtProperty.getValue());
continue; Property property = new Property(); property.setName(identityMgtProperty.getName()); property.setValue(identityMgtProperty.getValue());
if (inboundRequestConfig.getInboundAuthType().equals(OAUTH2)) { Property[] props = inboundRequestConfig.getProperties(); Property property = new Property(); property.setName(OAUTH2_CONSUMER_SECRET); property.setValue(getClientSecret(inboundRequestConfig.getInboundAuthKey()));
if (inboundRequestConfig.getInboundAuthType().equals(OAUTH2)) { Property[] props = inboundRequestConfig.getProperties(); Property property = new Property(); property.setName(OAUTH2_CONSUMER_SECRET); property.setValue(getClientSecret(inboundRequestConfig.getInboundAuthKey()));