From 305ad9fa8347f3d58976c9e051eb2cbe1a2417c2 Mon Sep 17 00:00:00 2001 From: Gary White Date: Thu, 29 Mar 2018 15:02:36 -0400 Subject: [PATCH 1/2] Update README.md according to: https://stackoverflow.com/questions/13924825/safe-cast-to-hash-map It's not implicit to cast HashMap from a Map without a potential Exception. since [auth.getAttributes()](https://stackoverflow.com/questions/13924825/safe-cast-to-hash-map) returns a "Map", updating to reflect this change. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0ef4f442..48b1536e 100644 --- a/README.md +++ b/README.md @@ -403,7 +403,7 @@ Related to the SP there are 3 important endpoints: The metadata view, the ACS vi This code will provide the XML metadata file of our SP, based on the info that we provided in the settings files. ``` Auth auth = new Auth(); -Saml2Settings settings = auth.getSettings(); +Saml2Settings settings = gegetSettings(); String metadata = settings.getSPMetadata(); List errors = Saml2Settings.validateMetadata(metadata); if (errors.isEmpty()) { @@ -438,7 +438,7 @@ if (!errors.isEmpty()) { } } } else { - HashMap> attributes = auth.getAttributes(); + Map> attributes = auth.getAttributes(); String nameId = auth.getNameId(); session.setAttribute("attributes", attributes); session.setAttribute("nameId", nameId); From 3bbac78fa3f08482d0c4e0e53ac12ad03069f65b Mon Sep 17 00:00:00 2001 From: Gary White Date: Thu, 17 May 2018 08:54:02 -0400 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 48b1536e..48cb78b7 100644 --- a/README.md +++ b/README.md @@ -403,7 +403,7 @@ Related to the SP there are 3 important endpoints: The metadata view, the ACS vi This code will provide the XML metadata file of our SP, based on the info that we provided in the settings files. ``` Auth auth = new Auth(); -Saml2Settings settings = gegetSettings(); +Saml2Settings settings = auth.getSettings(); String metadata = settings.getSPMetadata(); List errors = Saml2Settings.validateMetadata(metadata); if (errors.isEmpty()) {