Interface IEnterpriseConfigBuilder
interface IEnterpriseConfigBuilder
Extends com.amazon.apmf.IStandard
Builder for constructing an immutable IEnterpriseConfig.
All setter methods return the builder instance for fluent chaining.
Call build() to produce the final configuration.
Methods
eapMethod()
Set the EAP authentication method.IEnterpriseConfigBuilder*eapMethod(EapMethod*method)
Parameters
method
EapMethod* — Required
EapMethod.
Returns
IEnterpriseConfigBuilder*
this builder for chaining.
phase2Method()
Set the Phase 2 (inner) authentication method. Applicable for tunneled EAP methods such as PEAP and EAP-TTLS.IEnterpriseConfigBuilder*phase2Method(EapPhase2Method*method)
Parameters
method
EapPhase2Method* — Required
EapPhase2Method.
Returns
IEnterpriseConfigBuilder*
this builder for chaining.
addCaCertificate()
Add a CA certificate for server certificate validation. The certificate is encoded in PEM or DER format. Multiple certificates can be added when the server uses a certificate chain. Call this method once per certificate.IEnterpriseConfigBuilder*addCaCertificate(u8[]caCert)
Parameters
caCert
u8[] — Required
CA certificate in PEM/DER format.
Returns
IEnterpriseConfigBuilder*
this builder for chaining.
clientCertificate()
Set the client certificate for mutual TLS authentication (EAP-TLS). The certificate is encoded in PEM or DER format.IEnterpriseConfigBuilder*clientCertificate(u8[]cert)
Parameters
cert
u8[] — Required
client certificate.
Returns
IEnterpriseConfigBuilder*
this builder for chaining.
clientPrivateKey()
Set the client private key for EAP-TLS. The key is in PEM or DER format and MUST NOT be encrypted.IEnterpriseConfigBuilder*clientPrivateKey(u8[]key)
Parameters
key
u8[] — Required
client private key.
Returns
IEnterpriseConfigBuilder*
this builder for chaining.
identity()
Set the user identity (e.g., “user@example.com”).IEnterpriseConfigBuilder*identity(stringidentity)
Parameters
identity
string — Required
user identity string.
Returns
IEnterpriseConfigBuilder*
this builder for chaining.
anonymousIdentity()
Set the anonymous (outer) identity for tunneled EAP methods (PEAP, EAP-TTLS). This identity is sent unencrypted in the outer EAP exchange and can be used to hide the real identity.IEnterpriseConfigBuilder*anonymousIdentity(stringanonymousIdentity)
Parameters
anonymousIdentity
string — Required
anonymous identity string.
Returns
IEnterpriseConfigBuilder*
this builder for chaining.
password()
Set the password for EAP methods that use credential-based inner authentication (e.g. PEAP-MSCHAPv2, EAP-TTLS/PAP).IEnterpriseConfigBuilder*password(stringpassword)
Parameters
password
string — Required
the user password.
Returns
IEnterpriseConfigBuilder*
this builder for chaining.
build()
Build the immutable enterprise configuration. Validates that required fields are set based on the EAP method:IEnterpriseConfig*build()
- All methods:
eapMethodmust be set. - EAP-TLS:
clientCertificateandclientPrivateKeymust be set. - PEAP/TTLS:
identityandpasswordmust be set.
Returns
IEnterpriseConfig*
the constructed IEnterpriseConfig.
Throws
InvalidArgumentError— if required fields are not set.

