From commits-return-29591-archive-asf-public=cust-asf.ponee.io@geode.apache.org Wed Nov 28 19:38:47 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 30156180658 for ; Wed, 28 Nov 2018 19:38:47 +0100 (CET) Received: (qmail 43698 invoked by uid 500); 28 Nov 2018 18:38:46 -0000 Mailing-List: contact commits-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list commits@geode.apache.org Received: (qmail 43687 invoked by uid 99); 28 Nov 2018 18:38:46 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2018 18:38:46 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 78F4B82EDD; Wed, 28 Nov 2018 18:38:45 +0000 (UTC) Date: Wed, 28 Nov 2018 18:38:45 +0000 To: "commits@geode.apache.org" Subject: [geode-native] branch develop updated: GEODE-4728 User Guide: Update Authentication section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <154343032541.21700.4165895431483312590@gitbox.apache.org> From: dbarnes@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: geode-native X-Git-Refname: refs/heads/develop X-Git-Reftype: branch X-Git-Oldrev: 5e6c4b88adafe566a774c89aaaef99ae38ebf3cc X-Git-Newrev: 500ad9eaf56d80716c7d496e2ed3ad6d45c622b6 X-Git-Rev: 500ad9eaf56d80716c7d496e2ed3ad6d45c622b6 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 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(); + 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 {