mina-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lgoldst...@apache.org
Subject [2/3] mina-sshd git commit: [SSHD-741] Added FilePasswordProvider#of(String) convenience method
Date Sun, 04 Jun 2017 09:30:20 GMT
[SSHD-741] Added FilePasswordProvider#of(String) convenience method


Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/283857b8
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/283857b8
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/283857b8

Branch: refs/heads/master
Commit: 283857b80209756488c6661be61a666284d3c2a1
Parents: 7f6563c
Author: Goldstein Lyor <lyor@c-b4.com>
Authored: Thu May 25 13:08:21 2017 +0300
Committer: Goldstein Lyor <lyor@c-b4.com>
Committed: Sun Jun 4 12:30:12 2017 +0300

----------------------------------------------------------------------
 .../org/apache/sshd/common/config/keys/FilePasswordProvider.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/283857b8/sshd-core/src/main/java/org/apache/sshd/common/config/keys/FilePasswordProvider.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/config/keys/FilePasswordProvider.java
b/sshd-core/src/main/java/org/apache/sshd/common/config/keys/FilePasswordProvider.java
index 35f7558..064f75c 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/config/keys/FilePasswordProvider.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/config/keys/FilePasswordProvider.java
@@ -38,4 +38,8 @@ public interface FilePasswordProvider {
      * @throws IOException if cannot resolve password
      */
     String getPassword(String resourceKey) throws IOException;
+
+    static FilePasswordProvider of(String password) {
+        return r -> password;
+    }
 }


Mime
View raw message