Skip to content

ExternalAuthenticationAuthorizeTokenRequest22

Bases: OCIRequest

This command is part of the Portal API. Sent when a Web or CLI user logs in using external authentication. The hashed password value in the request is supported only when the request is sent from the CommPilot web portal. The response is either SuccessResponse or ErrorResponse.

Attributes:

user_id (str):

password (Optional[str]):

is_password_hashed (Optional[bool]):

login_token (str):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class ExternalAuthenticationAuthorizeTokenRequest22(OCIRequest):
    """This command is part of the Portal API.
        Sent when a Web or CLI user logs in using external authentication.
        The hashed password value in the request is supported only when the request is sent from the CommPilot web portal.
        The response is either SuccessResponse or ErrorResponse.

    Attributes:

        user_id (str):

        password (Optional[str]):

        is_password_hashed (Optional[bool]):

        login_token (str):

    """

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

    password: Optional[str] = field(default=None, metadata={"alias": "password"})

    is_password_hashed: Optional[bool] = field(
        default=None, metadata={"alias": "isPasswordHashed"}
    )

    login_token: str = field(metadata={"alias": "loginToken"})

Responses

Bases: OCIResponse

Source code in src/mercury_ocip/commands/base_command.py
class SuccessResponse(OCIResponse):
    pass

Bases: OCIResponse

Source code in src/mercury_ocip/commands/base_command.py
class ErrorResponse(OCIResponse):
    errorCode: Optional[int] = None
    summary: str
    summaryEnglish: str
    detail: Optional[str] = None

Example Usage

from mercury_ocip.client import Client
from mercury_ocip.commands import ExternalAuthenticationAuthorizeTokenRequest22

client = Client()

command = ExternalAuthenticationAuthorizeTokenRequest22(
    user_id=...,
    password=...,
    is_password_hashed=...,
    login_token=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("ExternalAuthenticationAuthorizeTokenRequest22",
    user_id=...,
    password=...,
    is_password_hashed=...,
    login_token=...,
)

print(response)