You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cr...@apache.org on 2021/05/18 21:16:02 UTC

[sling-org-apache-sling-auth-saml2] branch master updated: update javadocs

This is an automated email from the ASF dual-hosted git repository.

cris pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-saml2.git


The following commit(s) were added to refs/heads/master by this push:
     new 92fb43b  update javadocs
92fb43b is described below

commit 92fb43b1c866857047369314163ea330cddb25ea
Author: Cris Rockwell <cm...@umich.edu>
AuthorDate: Tue May 18 17:15:43 2021 -0400

    update javadocs
---
 release.properties                                    | 19 +++++++++++++++++++
 .../apache/sling/auth/saml2/Saml2UserMgtService.java  | 15 +++++++++++----
 .../sling/auth/saml2/sp/KeyPairCredentials.java       | 12 ++++++------
 .../apache/sling/auth/saml2/sp/SessionStorage.java    | 10 +++++-----
 .../auth/saml2/sp/VerifySignatureCredentials.java     |  2 +-
 5 files changed, 42 insertions(+), 16 deletions(-)

diff --git a/release.properties b/release.properties
new file mode 100644
index 0000000..244b9ac
--- /dev/null
+++ b/release.properties
@@ -0,0 +1,19 @@
+#release configuration
+#Tue May 18 17:13:33 EDT 2021
+projectVersionPolicyId=OddEvenVersionPolicy
+scm.rollbackCommitComment=@{prefix} rollback the release of @{releaseLabel}
+remoteTagging=true
+scm.commentPrefix=[maven-release-plugin] 
+releaseStrategyId=default
+scm.branchCommitComment=@{prefix} prepare branch @{releaseLabel}
+completedPhase=check-poms
+scm.url=scm\:git\:https\://gitbox.apache.org/repos/asf/sling-parent.git/org.apache.sling.auth.saml2
+scm.developmentCommitComment=@{prefix} prepare for next development iteration
+scm.tagNameFormat=@{project.artifactId}-@{project.version}
+exec.additionalArguments=-Papache-release 
+pushChanges=true
+project.scm.org.apache.sling\:org.apache.sling.auth.saml2.empty=true
+exec.snapshotReleasePluginAllowed=false
+preparationGoals=clean verify
+scm.releaseCommitComment=@{prefix} prepare release @{releaseLabel}
+exec.pomFileName=pom.xml
diff --git a/src/main/java/org/apache/sling/auth/saml2/Saml2UserMgtService.java b/src/main/java/org/apache/sling/auth/saml2/Saml2UserMgtService.java
index 17a8898..d59c450 100644
--- a/src/main/java/org/apache/sling/auth/saml2/Saml2UserMgtService.java
+++ b/src/main/java/org/apache/sling/auth/saml2/Saml2UserMgtService.java
@@ -26,37 +26,44 @@ public interface Saml2UserMgtService {
 
     /**
      * Call setUp before using any other Saml2UserMgtService method
+     * Setup initializes service resolver and called before each use
+     * @return returns true if setup is successful
      */
     boolean setUp();
 
     /**
      * getOrCreateSamlUser(Saml2User user) will be called if userHome is not configured
-     * @param user
-     * @return
+     * @param Saml2User user creates the JCR user in the default /home location
+     * @return returns the existing or new JCR user
      */
     User getOrCreateSamlUser(Saml2User user);
     
     /**
      * getOrCreateSamlUser(Saml2User user) will be called if userHome is configured
-     * @param user
-     * @return
+     * @param Saml2User user gets or creates the JCR user in supplied userHome path
+     * @return returns the existing or new JCR user
      */
     User getOrCreateSamlUser(Saml2User user, String userHome);
     
     /**
      * Users group membership will be updated based on the groups contained in the 
      * configured element of the SAML Assertion
+     * @param Saml2User user to update membership
+     * @return returns true if the user's group membership was updated
      */
     boolean updateGroupMembership(Saml2User user);
 
     /**
      * Users properties will be updated based on user properties contained in the 
      * configured properties of the SAML Assertion
+     * @param Saml2User user to update properties
+     * @return returns true if the user properties were updated 
      */
     boolean updateUserProperties(Saml2User user);
     
     /**
      * Call cleanUp after using Saml2UserMgtService methods
+     * This should be called after using the service to close out the service resolver
      */
     void cleanUp();
 }
diff --git a/src/main/java/org/apache/sling/auth/saml2/sp/KeyPairCredentials.java b/src/main/java/org/apache/sling/auth/saml2/sp/KeyPairCredentials.java
index e85a886..34bdf40 100644
--- a/src/main/java/org/apache/sling/auth/saml2/sp/KeyPairCredentials.java
+++ b/src/main/java/org/apache/sling/auth/saml2/sp/KeyPairCredentials.java
@@ -39,11 +39,11 @@ public class KeyPairCredentials extends JksCredentials {
      * Returns a BasicX509Credential representing the key pair of the SAML Service Provider
      * This credential is used to encrypt and cryptographically sign SAML messages sent to the Identity Provider.
      *
-     * @param jksPath
-     * @param jksPassword
-     * @param certAlias
-     * @param keysPassword
-     * @return
+     * @param jksPath path on the file system, e.g. ./sling/keys/example.jks
+     * @param jksPassword truststore password as char array
+     * @param certAlias alias given to the keystore associated to this Service Provider
+     * @param keysPassword password for the keystore associated to this Service Provider
+     * @return returns the SP X509 Credential
      */
     public static BasicX509Credential getCredential (
             final String jksPath,
@@ -56,7 +56,7 @@ public class KeyPairCredentials extends JksCredentials {
             X509Certificate cert = (X509Certificate) keyStore.getCertificate(certAlias);
             PublicKey publicKey = cert.getPublicKey();
             KeyPair keyPair = new KeyPair(publicKey, (PrivateKey) key);
-            return CredentialSupport.getSimpleCredential(cert,keyPair.getPrivate() );
+            return CredentialSupport.getSimpleCredential(cert,keyPair.getPrivate());
         } catch (java.security.KeyStoreException | NoSuchAlgorithmException | UnrecoverableKeyException e) {
             throw new SAML2RuntimeException(e);
         }
diff --git a/src/main/java/org/apache/sling/auth/saml2/sp/SessionStorage.java b/src/main/java/org/apache/sling/auth/saml2/sp/SessionStorage.java
index 76b9e79..9f715ff 100644
--- a/src/main/java/org/apache/sling/auth/saml2/sp/SessionStorage.java
+++ b/src/main/java/org/apache/sling/auth/saml2/sp/SessionStorage.java
@@ -40,8 +40,8 @@ public class SessionStorage {
 
     /**
      * Setting String Attributes. Store string info in an http session attribute.
-      * @param request
-     * @param info
+      * @param request http request of the user
+     *  @param info set the value of the attribute
      */
     public void setString(HttpServletRequest request, String info) {
         HttpSession session = request.getSession();
@@ -50,7 +50,8 @@ public class SessionStorage {
 
     /**
      * Getting String Attributes
-     * @param request
+     * @param request http request of the user
+     * @return value of the session attribute
      */
     public String getString(HttpServletRequest request) {
         HttpSession session = request.getSession(false);
@@ -65,8 +66,7 @@ public class SessionStorage {
 
     /**
      * Remove this attribute from the http session
-     * @param request
-     * @param response
+     * @param request http request of the user
      */
     public void clear(HttpServletRequest request) {
         HttpSession session = request.getSession(false);
diff --git a/src/main/java/org/apache/sling/auth/saml2/sp/VerifySignatureCredentials.java b/src/main/java/org/apache/sling/auth/saml2/sp/VerifySignatureCredentials.java
index 1269f36..69b07d4 100644
--- a/src/main/java/org/apache/sling/auth/saml2/sp/VerifySignatureCredentials.java
+++ b/src/main/java/org/apache/sling/auth/saml2/sp/VerifySignatureCredentials.java
@@ -42,7 +42,7 @@ public class VerifySignatureCredentials extends JksCredentials {
      * @param jksPath The path to the JKS holding the Certification
      * @param jksPassword Password of the Java KeyStore
      * @param certAlias The Alias of the public key credential used to create the X509
-     * @return
+     * @return returns the Credential
      */
 
     public static Credential getCredential(