CreateWithTokenAndName(string databaseAccessToken, string endUserName)

This method creates a new end-user security context using a database access token and end-user identity.

Declaration

// C#
public static OracleEndUserSecurityContext CreateWithTokenAndName(string databaseAccessToken, string endUserName)

Parameters

  • databaseAccessToken

    Database access token string.

  • endUserName

    End-user name to associate with the security context.

Return Value

A new OracleEndUserSecurityContext initialized with the provided database token, end-user name, and an implicitly generated lookup key.

Exceptions

ArgumentException - Thrown if either databaseAccessToken or endUserName is null or empty.

Other exceptions may be thrown by token parsing and expiry validation checks.

Remarks

This method:

  • Validates both input strings are non-null and non-empty.

  • Constructs an internal token object from the database token provided string.

  • Implicitly generates a lookup key.

  • Validates the database token and checks whether it has expired before returning the context.

The end-user name should be enclosed in double-quotes if the end user was declared using a quoted identifier.