OpenWithNewToken(char[], char[])

This method can be used by the application to open a new connection by providing the refreshed/updated signature token and private key directly to ODP.NET instead of through the token refresh call back. It is recommended to be used only in cases the application is unable or fails to provide the refreshed/updated token and private key through the token refresh call back.

Declaration

// C#
public void OpenWithNewToken(char[] dbToken, char[] privateKey)

Exceptions

  • ArgumentNullException is raised if any parameters are passed in as null.

  • Exception if connection is already open.

  • Exception if the ‘sub’ value of the new token does not match the ‘sub’ value of the current token.

Description

The ‘sub’ value of the new token must be the same as the ‘sub’ value of the current token. ODP.NET will use the application provided signature token and private key to open a new connection to the database. If the new connection can be opened successfully, then the underlying OracleAccessToken object will be updated with these new token and private key. If ODP.NET fails to open the new connection, then an exception will be thrown to the application and the OracleAccessToken object will not be updated with the new token and private key.

The char[] passed by the application for DB token and private key will be cleared by ODP.NET. Applications should not depend on these char[] once this constructor is called.