TokenLocation
This property gets or sets the token location path for the connection where the access token, or database token and private key files, are present for ODP.NET token authentication. The file names do not need to be specified.
Declaration
// C# public string TokenLocation { get; set; }
Property Value
A directory location.
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.
Expections
-
An
InvalidOperationException
will be raised if-
the connection is already open,
-
the
AccessToken
orCredential
properties are set, -
or if
TokenAuthentication
has been set to disabled by the application. -
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.
Description
This property is mandatory for OAuth file-based access tokens, but optional for database tokens.
In the access token case, this property can be the directory where the file "token" is, or the full-path specification of the token file.
For OCI IAM PoP tokens, a file's full-path specification can be specified if it does not have the standard name, "token". A file name does not need to be specified when it uses this standard, fixed name. Bearer token default token location is an empty string.
Note:
Only managed ODP.NET and ODP.NET Core can use this property.