Authentication API
The interfaces that are used for authentication are contained in the packages com.pushtechnology.diffusion.client.security.authentication and com.pushtechnology.diffusion.client.types.
Local authentication handlers can be written only in Java™ and must be present on the server's classpath to be used. Control authentication handlers use the Unified API. You can write control authentication handlers in any language for which the client library supports the AuthenticationControl feature.
This section contains information only about those parts of the API that are used to write a local authentication handler. For more information about those parts of the API specific to control authentication handlers, see .
API documentation for the authentication API is available at the following location: Java Unified API documentation
Classes and interfaces in the com.pushtechnology.diffusion.client.security.authentication package
Interface | Description |
---|---|
AuthenticationHandler | Your authentication handler must implement this interface.
Note:
Your authentication handler can have either a no-argument constructor or a constructor that takes a single argument: ServerConfig. Use the single argument constructor when you want your authentication handler to access the server configuration, (for example, to discover the name of the server in which the handler is running). |
CompositeAuthenticationHandler | Your composite authentication handler must extend this class. |
AuthenticationHandler.Callback | Your authentication handler must respond to authentication requests by calling one of the methods on this interface: allow(), deny(), or abstain(). |
Interfaces in the c.p.d.client.types package
Interface | Description |
---|---|
Credentials | Your authentication handler receives the principal's credential information as a ByteArray wrapped in an object that implements the Credentials interface. You can use the toBytes() method to retrieve the byte information. The authentication handler must be able to interpret the bytes in the array appropriately. Credentials can have one of the following types:
|