public static class SimpleAuthenticator.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
SimpleAuthenticator |
newInstance()
Construct a new instance of the SimpleAuthenticator.
|
SimpleAuthenticator.Builder |
principal(byte[] encodedPrincipal,
byte[] encodedCredentials)
Add a principal/credentials pair to the list supported by this authenticator.
|
public SimpleAuthenticator.Builder principal(byte[] encodedPrincipal, byte[] encodedCredentials)
SimpleAuthenticator keys the principals by the credentials, so the encoded credentials should
include the encoded principal. The associated CredentialsSupplier used on the client should handle
encoding these credentials correctly as well. E.g.
final SimpleAuthenticator simpleAuthenticator = new SimpleAuthenticator.Builder()
.principal("user".getBytes(US_ASCII), "user:pass".getBytes(US_ASCII))
.newInstance();
encodedPrincipal - principal encoded as a byte array.encodedCredentials - credentials encoded as a byte array.public SimpleAuthenticator newInstance()
Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.