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 |
|---|---|
|
|
Default value. Token authentication is |
|
|
Token authentication is enabled for Oracle Identity and Access Management. |
OAuth |
Token authentication enabled for Azure Active Directory. |
Exceptions
-
An
InvalidOperationExceptionwill be raised if-
the connection is already open,
- the value of the
AccessTokenproperty is not compatible with the type of token authentication being set, -
TokenAuthenticationis set to disabled and theAccessTokenorTokenLocationproperties are set, -
or,
TokenAuthenticationis set to a value other than disabled, and theCredentialproperty is set. -
It can also be raised if the user or proxy information in the connection string is not compatible with token authentication.
-
-
OracleExceptionif Credential is set. -
OracleExceptionif user id value is other than/. -
OracleExceptionif password, proxy user id and proxy password is set.
Note:
Only managed ODP.NET and ODP.NET Core can use this property.