The ASUserAuthenticator example demonstrates how to use the user authentication callback mechanism to implement your own functionality for retrieving user authentication information. However, you must first have configured the example security policy file to enable user authentication as described in
User Authentication Example. After
ASUserAuthenticator successfully connects to a metaspace, it loops, waiting for user input to tell it to shut down.
The following examples show how to invoke ASUserAuthenticator for each of the API sets. If you do not start the example from the security subdirectory of the examples, be sure to enter the full path of the
exdomain_token.txt file.
Once the ASUserAuthenticator example starts, you will see the following prompts:
You will notice in this example that the password you enter is echoed back to you. ASUserAuthenticator is only an example and uses the input mechanisms provided by the implementation language. Various software packages are available from third-party vendors which you can use to not echo what is being input by the user.
ASUserAuthenticator connects to the default metaspace named
ms. Once
ASUserAuthenticator has started, it will displayed a short menu of options. The following options are allowed:
h - display command line help information
The example security policy file example_policy.txt has a predefined user named
user1 who has been configured to have the following permissions for all spaces in the default metaspace named
ms:
When ASOperations tries to connect to the metaspace, you will be prompted for your user login information. After that
ASOperations will join the space. You should be able to do some puts and gets on the space and browse the space.