TokenAuthentication

This property sets the value for TOKEN_AUTH parameter for the connection. The possible values for this property can be OracleTokenAuth.OciToken, OracleTokenAuth.Disabled, or OracleTokenAuth.OAuth.

Declaration

// C#
public OracleTokenAuth TokenAuthentication { get; set; }

Remarks

The value of this property will be part of connection pool manager identification so different values for this property will result in different connection pools.

Table 7-51 OracleTokenAuth Members

Member Name Description

Disabled

Default value. Token authentication is DISABLED.

OciToken

Token authentication is enabled for Oracle Identity and Access Management.

OAuth

Token authentication enabled for Azure Active Directory.

Exceptions

  • An InvalidOperationException will be raised if

    • the connection is already open,

    • the value of the AccessToken property is not compatible with the type of token authentication being set,
    • TokenAuthentication is set to disabled and the AccessToken or TokenLocation properties are set,

    • or, TokenAuthentication is set to a value other than disabled, and the Credential property is set.

    • It can also be raised if the user or proxy information in the connection string is not compatible with token authentication.

  • OracleException if Credential is set.

  • OracleException if user id value is other than /.

  • OracleException if password, proxy user id and proxy password is set.

Note:

Only managed ODP.NET and ODP.NET Core can use this property.