cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [3/5] git commit: updated refs/heads/4.5-samlfixes to 38d6bae
Date Thu, 13 Aug 2015 12:56:29 GMT
CLOUDSTACK-8701: Add administrative contact block as per SAML IDP expectations

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3a8785b7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3a8785b7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3a8785b7

Branch: refs/heads/4.5-samlfixes
Commit: 3a8785b7c05a20b0b33bc506c5be743333a845a6
Parents: a1a6bc7
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Sun Aug 9 00:13:51 2015 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Thu Aug 13 18:25:58 2015 +0530

----------------------------------------------------------------------
 .../api/command/GetServiceProviderMetaDataCmd.java    | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3a8785b7/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java
----------------------------------------------------------------------
diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java
b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java
index bed594f..80d38fd 100644
--- a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java
+++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java
@@ -205,16 +205,28 @@ public class GetServiceProviderMetaDataCmd extends BaseCmd implements
APIAuthent
         spSSODescriptor.addSupportedProtocol(SAMLConstants.SAML20P_NS);
         spEntityDescriptor.getRoleDescriptors().add(spSSODescriptor);
 
-        ContactPerson contactPerson = new ContactPersonBuilder().buildObject();
+        // Add technical contact
         GivenName givenName = new GivenNameBuilder().buildObject();
         givenName.setName(spMetadata.getContactPersonName());
         EmailAddress emailAddress = new EmailAddressBuilder().buildObject();
         emailAddress.setAddress(spMetadata.getContactPersonEmail());
+        ContactPerson contactPerson = new ContactPersonBuilder().buildObject();
         contactPerson.setType(ContactPersonTypeEnumeration.TECHNICAL);
         contactPerson.setGivenName(givenName);
         contactPerson.getEmailAddresses().add(emailAddress);
         spEntityDescriptor.getContactPersons().add(contactPerson);
 
+        // Add administrative/support contact
+        GivenName givenNameAdmin = new GivenNameBuilder().buildObject();
+        givenNameAdmin.setName(spMetadata.getContactPersonName());
+        EmailAddress emailAddressAdmin = new EmailAddressBuilder().buildObject();
+        emailAddressAdmin.setAddress(spMetadata.getContactPersonEmail());
+        ContactPerson contactPersonAdmin = new ContactPersonBuilder().buildObject();
+        contactPersonAdmin.setType(ContactPersonTypeEnumeration.ADMINISTRATIVE);
+        contactPersonAdmin.setGivenName(givenNameAdmin);
+        contactPersonAdmin.getEmailAddresses().add(emailAddressAdmin);
+        spEntityDescriptor.getContactPersons().add(contactPersonAdmin);
+
         Organization organization = new OrganizationBuilder().buildObject();
         OrganizationName organizationName = new OrganizationNameBuilder().buildObject();
         organizationName.setName(new LocalizedString(spMetadata.getOrganizationName(), Locale.getDefault().getLanguage()));


Mime
View raw message