Providing Credentials to AMPS
When a client logs on to AMPS, the client sends AMPS a username and password. The username is derived from the URI, using the standard syntax for providing a username in a URI. For example, tcp://JohnDoe:@server:port/amps/messagetype
to include the username JohnDoe
in the request.
For a given username, the password is provided by an Authenticator
. The AMPS client distribution includes a DefaultAuthenticator
that simply returns the password, if any, provided in the URI. A logon()
command that does not specify an Authenticator
will use an instance of DefaultAuthenticator
.
If your authentication system requires a different authentication token, you can implement an Authenticator
that provides the appropriate token.
Last updated