Skip to content

AuthenticationRequest

Bases: OCIRequest

AuthenticationRequest()/AuthenticationResponse is 1st stage of the 2 stage OCI login process.

Attributes:

NameTypeDescription
user_idstr
Source code in src/mercury_ocip/commands/commands.py
@dataclass
class AuthenticationRequest(OCIRequest):
    """
    `AuthenticationRequest()`/AuthenticationResponse is 1st stage of the 2 stage OCI login process.


    Attributes:
        user_id (str):
    """

    user_id: str = field(default_factory=str, metadata={"alias": "userId"})

Responses

Bases: OCIDataResponse

AuthenticationRequest()/Response is 1st stage of the 2 stage OCI login process.

Attributes:

NameTypeDescription
user_idstr

userId

noncestr

nonce

password_algorithmstr

passwordAlgorithm

Source code in src/mercury_ocip/commands/commands.py
class AuthenticationResponse(OCIDataResponse):
    """
    `AuthenticationRequest()`/Response is 1st stage of the 2 stage OCI login process.


    Attributes:
        user_id (str): userId
        nonce (str): nonce
        password_algorithm (str): passwordAlgorithm
    """

    user_id: str = field(default_factory=str, metadata={"alias": "userId"})
    nonce: str = field(default_factory=str, metadata={"alias": "nonce"})
    password_algorithm: str = field(
        default_factory=str, metadata={"alias": "passwordAlgorithm"}
    )

Example Usage

from mercury_ocip.client import Client
from mercury_ocip.commands import AuthenticationRequest

client = Client()

command = AuthenticationRequest(
    user_id=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("AuthenticationRequest",
    user_id=...,
)

print(response)