Share via


CellularApnContext.AuthenticationType Property

Definition

Specifies the APN authentication method (see CellularApnAuthenticationType).

public:
 property CellularApnAuthenticationType AuthenticationType { CellularApnAuthenticationType get(); void set(CellularApnAuthenticationType value); };
CellularApnAuthenticationType AuthenticationType();

void AuthenticationType(CellularApnAuthenticationType value);
public CellularApnAuthenticationType AuthenticationType { get; set; }
var cellularApnAuthenticationType = cellularApnContext.authenticationType;
cellularApnContext.authenticationType = cellularApnAuthenticationType;
Public Property AuthenticationType As CellularApnAuthenticationType

Property Value

A CellularApnAuthenticationType value indicating the protocol used; defaults to None if not set.

Remarks

Supported values

Value Meaning
None No authentication (open / default APN)
Pap Password Authentication Protocol (cleartext password exchange)
Chap Challenge Handshake Authentication Protocol (shared secret challenge)
Mschapv2 Microsoft CHAP v2 (mutual authentication improvements over CHAP)

Guidance

  • Use the minimal required method published by the carrier; stronger methods are not always accepted.
  • Provide UserName / Password only when the authentication type requires them (avoid sending empty credentials).
  • Do not downgrade automatically (e.g., from MSCHAPv2 to PAP) without explicit user/carrier guidance.

Security considerations

Method Relative security Notes
None Lowest Suitable only for carrier plans that mandate unauthenticated APN
Pap Low Cleartext password (inside lower-layer encryption if present)
Chap Moderate Challenge/response avoids sending password directly
Mschapv2 Higher Mutual auth aspects; still rely on secure transport for confidentiality

Note

Even with an authentication method set, transport encryption of user payloads (TLS / VPN) is still recommended.

Applies to