Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

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()

IEnterpriseConfigBuilder* eapMethod(EapMethod* method)
Set the EAP authentication method.

Parameters

method
EapMethod* — Required EapMethod.

Returns

IEnterpriseConfigBuilder* this builder for chaining.

phase2Method()

IEnterpriseConfigBuilder* phase2Method(EapPhase2Method* method)
Set the Phase 2 (inner) authentication method. Applicable for tunneled EAP methods such as PEAP and EAP-TTLS.

Parameters

method
EapPhase2Method* — Required EapPhase2Method.

Returns

IEnterpriseConfigBuilder* this builder for chaining.

addCaCertificate()

IEnterpriseConfigBuilder* addCaCertificate(u8[] caCert)
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.

Parameters

caCert
u8[] — Required CA certificate in PEM/DER format.

Returns

IEnterpriseConfigBuilder* this builder for chaining.

clientCertificate()

IEnterpriseConfigBuilder* clientCertificate(u8[] cert)
Set the client certificate for mutual TLS authentication (EAP-TLS). The certificate is encoded in PEM or DER format.

Parameters

cert
u8[] — Required client certificate.

Returns

IEnterpriseConfigBuilder* this builder for chaining.

clientPrivateKey()

IEnterpriseConfigBuilder* clientPrivateKey(u8[] key)
Set the client private key for EAP-TLS. The key is in PEM or DER format and MUST NOT be encrypted.

Parameters

key
u8[] — Required client private key.

Returns

IEnterpriseConfigBuilder* this builder for chaining.

identity()

IEnterpriseConfigBuilder* identity(string identity)
Set the user identity (e.g., “user@example.com”).

Parameters

identity
string — Required user identity string.

Returns

IEnterpriseConfigBuilder* this builder for chaining.

anonymousIdentity()

IEnterpriseConfigBuilder* anonymousIdentity(string 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.

Parameters

anonymousIdentity
string — Required anonymous identity string.

Returns

IEnterpriseConfigBuilder* this builder for chaining.

password()

IEnterpriseConfigBuilder* password(string password)
Set the password for EAP methods that use credential-based inner authentication (e.g. PEAP-MSCHAPv2, EAP-TTLS/PAP).

Parameters

password
string — Required the user password.

Returns

IEnterpriseConfigBuilder* this builder for chaining.

build()

IEnterpriseConfig* build()
Build the immutable enterprise configuration. Validates that required fields are set based on the EAP method:
  • All methods: eapMethod must be set.
  • EAP-TLS: clientCertificate and clientPrivateKey must be set.
  • PEAP/TTLS: identity and password must be set.

Returns

IEnterpriseConfig* the constructed IEnterpriseConfig.

Throws


Last modified on October 29, 2026