DBMS_MFA Package

The DBMS_MFA provides subprograms to request and generate SQL Access Tokens, deliver the MFA challenge through the configured channel, and complete token authorization for the current user or session. These subprograms are used specifically with SQL Access Token MFA to initialize and validate SQL access after the user has connected using their primary authentication method.

SET_TOKEN Procedure

The DBMS_MFA.SET_TOKEN procedure to sets SQL Access Token for the registered user..

Syntax

DBMS_MFA.SET_TOKEN(
    token  IN VARCHAR2,
    email  IN  VARCHAR2 DEFAULT NULL
);

Parameters

Parameter Description
token Specifies the user access token to validate the session.
email Specifies the email used to initialize the token.

Example

BEGIN
    DBMS_MFA.SET_TOKEN (
        token => 'token');
END;
/

Usage Notes

INITIALIZE_SESSION Procedure

The DBMS_MFA.INITIALIZE_SESSION procedure initializes the database session using the specified email.

The DBMS_MFA.INITIALIZE_SESSION procedure accepts a user’s email address as an argument. If the provided email id is associated with a registered user to use SQL Token Access, a token code is sent to the user. This token code is then used to validate the user using the DBMS_MFA.SET_TOKEN procedure. See SET_TOKEN Procedure for more information.

Syntax

DBMS_MFA.INITIALIZE_SESSION (
      email  IN  VARCHAR2
);

Parameters

Parameter Description
email Specifies the email address registered for the user.

Example

BEGIN
    DBMS_MFA.INITIALIZE_SESSION (
        email => 'email'
 );
END;
/

Usage Notes