geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbar...@apache.org
Subject [geode-native] branch develop updated: GEODE-4728 User Guide: Update Authentication section
Date Wed, 28 Nov 2018 18:38:45 GMT
This is an automated email from the ASF dual-hosted git repository.

dbarnes pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
     new 500ad9e  GEODE-4728 User Guide: Update Authentication section
500ad9e is described below

commit 500ad9eaf56d80716c7d496e2ed3ad6d45c622b6
Author: Dave Barnes <dbarnes@pivotal.io>
AuthorDate: Wed Nov 28 10:38:37 2018 -0800

    GEODE-4728 User Guide: Update Authentication section
---
 .../security/authentication.html.md.erb            | 25 +++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/docs/geode-native-docs/security/authentication.html.md.erb b/docs/geode-native-docs/security/authentication.html.md.erb
index d12c4bc..2203d6d 100644
--- a/docs/geode-native-docs/security/authentication.html.md.erb
+++ b/docs/geode-native-docs/security/authentication.html.md.erb
@@ -19,19 +19,25 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-A client is authenticated when it connects with valid credentials to a <%=vars.product_name%>
cache server that is configured with the client `Authenticator` callback.
+A client is authenticated when it connects with valid credentials to a <%=vars.product_name%>
cache server that is configured with the client authentication callback.
 For details on the server's role in authentication and what it expects from the client, see
[Implementing Authentication](geodeman/managing/security/implementing_authentication.html)
in the *<%=vars.product_name%> User Guide*.
 
-Examples of various implementations can be found in the Native Client source distribution's
`../templates/security` directory.
-
 In your application, authentication credentials must be set when creating the cache. In practice,
 this means setting the authentication credentials when you create the CacheFactory.
 
 ### .NET Authentication Example
 
 The following excerpt is taken from the .NET example provided with your Native Client distribution
in the `../examples/dotnet/AuthInitialize` directory.
-In this C# authentication example, credentials are implemented in the GetCredentials member
function of the ExampleAuthInitialize class, which implements the IAuthInitialize interface.
 
+In this C# authentication example, the `CacheFactory` creation process sets the authentication
callback:
+
+```cs
+  var cacheFactory = new CacheFactory()
+    .Set("log-level", "none")
+    .SetAuthInitialize(new ExampleAuthInitialize());
+```
+
+Credentials are implemented in the `GetCredentials` member function of the `ExampleAuthInitialize`
class, which implements the `IAuthInitialize` interface:
 
 ```cs
   class ExampleAuthInitialize : IAuthInitialize
@@ -64,7 +70,16 @@ In this C# authentication example, credentials are implemented in the GetCredent
 
 ### C++ Authentication Example
 
-In this C++ authentication example, credentials are implemented in the getCredentials member
function of the AuthInitialize abstract class.
+In this C++ authentication example, the `CacheFactory` creation process sets the authentication
callback:
+
+```cpp
+  auto cacheFactory = CacheFactory(config);
+  auto authInitialize = std::make_shared<UserPasswordAuthInit>();
+  cacheFactory.set("log-level", "none");
+  cacheFactory.setAuthInitialize(authInitialize);
+```
+
+Credentials are implemented in the `getCredentials` member function of the `AuthInitialize`
abstract class.
 
 ```cpp
 class UserPasswordAuthInit : public AuthInitialize {


Mime
View raw message