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.

Not Available in ODP.NET, Unmanaged Driver

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 or Credential properties are set,

  • TokenAuthentication has been set to disabled by the application,

  • the user or proxy information in the connection string is not compatible with token authentication,

  • user id value is other than /, or

  • 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.