Package io.aeron.security
Class SimpleAuthenticator.Builder
java.lang.Object
io.aeron.security.SimpleAuthenticator.Builder
- Enclosing class:
- SimpleAuthenticator
Builder to create instances of SimpleAuthenticator.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConstruct a new instance of the SimpleAuthenticator.principal(byte[] encodedPrincipal, byte[] encodedCredentials) Add a principal/credentials pair to the list supported by this authenticator.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
principal
Add a principal/credentials pair to the list supported by this authenticator. Note that theSimpleAuthenticatorkeys the principals by the credentials, so the encoded credentials should include the encoded principal. The associatedCredentialsSupplierused on the client should handle encoding these credentials correctly as well. For example:final SimpleAuthenticator simpleAuthenticator = new SimpleAuthenticator.Builder() .principal("user".getBytes(US_ASCII), "user:pass".getBytes(US_ASCII)) .newInstance();- Parameters:
encodedPrincipal- principal encoded as a byte array.encodedCredentials- credentials encoded as a byte array.- Returns:
- this for a fluent API.
-
newInstance
Construct a new instance of the SimpleAuthenticator.- Returns:
- a new SimpleAuthenticator instance.
-