directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-enmasse git commit: FC-194 - Change password represenation from a char[] to a String
Date Tue, 11 Oct 2016 01:46:39 GMT
Repository: directory-fortress-enmasse
Updated Branches:
  refs/heads/master 8908aa9cc -> 86b216576


FC-194 - Change password represenation from a char[] to a String


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/commit/86b21657
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/tree/86b21657
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/diff/86b21657

Branch: refs/heads/master
Commit: 86b216576cc58916afafddd4f264944fdbb6d32c
Parents: 8908aa9
Author: Shawn McKinney <smckinney@apache.org>
Authored: Mon Oct 10 20:25:06 2016 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Mon Oct 10 20:25:06 2016 -0500

----------------------------------------------------------------------
 .../apache/directory/fortress/rest/AccessMgrImpl.java    |  6 +++---
 .../org/apache/directory/fortress/rest/AdminMgrImpl.java |  4 ++--
 src/test/resources/addEmUser1.xml                        |  9 +--------
 src/test/resources/createSession.xml                     | 11 ++---------
 src/test/resources/emTestAuthN.xml                       |  9 +--------
 5 files changed, 9 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/blob/86b21657/src/main/java/org/apache/directory/fortress/rest/AccessMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/rest/AccessMgrImpl.java b/src/main/java/org/apache/directory/fortress/rest/AccessMgrImpl.java
index 02a2561..326d88e 100644
--- a/src/main/java/org/apache/directory/fortress/rest/AccessMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/rest/AccessMgrImpl.java
@@ -58,7 +58,7 @@ class AccessMgrImpl extends AbstractMgrImpl
         {
             AccessMgr accessMgr = AccessMgrFactory.createInstance( request.getContextId()
);
             User inUser = (User) request.getEntity();
-            Session outSession = accessMgr.authenticate( inUser.getUserId(), inUser.getPassword()
);
+            Session outSession = accessMgr.authenticate( inUser.getUserId(), inUser.getPassword().toCharArray()
);
             response.setSession( outSession );
             response.setErrorCode( GlobalErrIds.NO_ERROR );
         }
@@ -150,8 +150,8 @@ class AccessMgrImpl extends AbstractMgrImpl
     /**
      * Perform user RBAC authorization.
      *
-     * @param request The {@link FortressRequest} we have to check
-     * @return a {@link FortressResponse} containing the response
+     * @param request The {@link FortRequest} we have to check
+     * @return a {@link FortResponse} containing the response
      */
     /* no qualifier*/ FortResponse checkAccess( FortRequest request )
     {

http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/blob/86b21657/src/main/java/org/apache/directory/fortress/rest/AdminMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/rest/AdminMgrImpl.java b/src/main/java/org/apache/directory/fortress/rest/AdminMgrImpl.java
index 391d31f..702029b 100644
--- a/src/main/java/org/apache/directory/fortress/rest/AdminMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/rest/AdminMgrImpl.java
@@ -128,7 +128,7 @@ class AdminMgrImpl extends AbstractMgrImpl
             AdminMgr adminMgr = AdminMgrFactory.createInstance( request.getContextId() );
             adminMgr.setAdmin( request.getSession() );
             User inUser = (User) request.getEntity();
-            adminMgr.changePassword(inUser, inUser.getNewPassword());
+            adminMgr.changePassword( inUser, inUser.getNewPassword().toCharArray() );
             ReviewMgr reviewMgr = ReviewMgrFactory.createInstance( request.getContextId()
);
             User outUser = reviewMgr.readUser( inUser );
             response.setEntity( outUser );
@@ -197,7 +197,7 @@ class AdminMgrImpl extends AbstractMgrImpl
             AdminMgr adminMgr = AdminMgrFactory.createInstance( request.getContextId() );
             adminMgr.setAdmin( request.getSession() );
             User inUser = (User) request.getEntity();
-            adminMgr.resetPassword(inUser, inUser.getNewPassword());
+            adminMgr.resetPassword( inUser, inUser.getNewPassword().toCharArray() );
             ReviewMgr reviewMgr = ReviewMgrFactory.createInstance( request.getContextId()
);
             User outUser = reviewMgr.readUser( inUser );
             response.setEntity( outUser );

http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/blob/86b21657/src/test/resources/addEmUser1.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/addEmUser1.xml b/src/test/resources/addEmUser1.xml
index b925e19..af225e8 100644
--- a/src/test/resources/addEmUser1.xml
+++ b/src/test/resources/addEmUser1.xml
@@ -49,13 +49,6 @@
          <locked>false</locked>
          <reset>false</reset>
          <timeout>0</timeout>
-         <password>112</password>
-         <password>97</password>
-         <password>115</password>
-         <password>115</password>
-         <password>119</password>
-         <password>111</password>
-         <password>114</password>
-         <password>100</password>
+         <password>password</password>
       </entity>
    </FortRequest>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/blob/86b21657/src/test/resources/createSession.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/createSession.xml b/src/test/resources/createSession.xml
index 649c55f..7f53546 100644
--- a/src/test/resources/createSession.xml
+++ b/src/test/resources/createSession.xml
@@ -22,13 +22,6 @@
       <contextId>HOME</contextId>
       <entity xsi:type="user" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <userId>emtestuser1</userId>
-         <password>112</password>
-         <password>97</password>
-         <password>115</password>
-         <password>115</password>
-         <password>119</password>
-         <password>111</password>
-         <password>114</password>
-         <password>100</password>
-      </entity>
+         <password>password</password>
+\      </entity>
    </FortRequest>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/blob/86b21657/src/test/resources/emTestAuthN.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/emTestAuthN.xml b/src/test/resources/emTestAuthN.xml
index 649c55f..99b7ee4 100644
--- a/src/test/resources/emTestAuthN.xml
+++ b/src/test/resources/emTestAuthN.xml
@@ -22,13 +22,6 @@
       <contextId>HOME</contextId>
       <entity xsi:type="user" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <userId>emtestuser1</userId>
-         <password>112</password>
-         <password>97</password>
-         <password>115</password>
-         <password>115</password>
-         <password>119</password>
-         <password>111</password>
-         <password>114</password>
-         <password>100</password>
+         <password>password</password>
       </entity>
    </FortRequest>
\ No newline at end of file


Mime
View raw message