UseOciTokenAuthentication

This method associates the OCI IAM token authentication settings with the OracleConnection object for use upon the next connection open.

Declaration

// C#
public static void UseOciTokenAuthentication(this OracleConnection @this, OciTokenAuthentication ociTokenAuth);

Remarks

The object hashcode passed in this method is part of the connection pool manager identification so that different objects result in different connection pools.

Once the ODP.NET OCI token authentication object opens a connection successfully, it becomes read only and can no longer be modified.

Exceptions

  • If the connection is already open

  • TokenAuthentication property is set to any value other than OciApiKey, OciInstancePrincipal, OciDelegationToken, OciInteractive, or OciDefault.