UserSingleSignOnCreateDeviceTokenRequest
Bases: OCIRequest
This command allows a BroadWorks or Third-Party Client Application to create a Single Sign-On token for a device of a user. The token is created only if: 1. the specified user is the owner of a lineport on the specified device (including a trunk user on a trunk device). 2. and, the specified device is not in locked state. 3. and, the device type of the device does support Device Management. The response is either UserSingleSignOnCreateDeviceTokenResponse or ErrorResponse.
Attributes:
user_id (str):
device_level (str):
device_name (str):
Source code in src/mercury_ocip/commands/commands.py
| @dataclass(kw_only=True)
class UserSingleSignOnCreateDeviceTokenRequest(OCIRequest):
"""This command allows a BroadWorks or Third-Party Client Application to
create a Single Sign-On token for a device of a user.
The token is created only if:
1. the specified user is the owner of a lineport on the specified device
(including a trunk user on a trunk device).
2. and, the specified device is not in locked state.
3. and, the device type of the device does support Device Management.
The response is either UserSingleSignOnCreateDeviceTokenResponse
or ErrorResponse.
Attributes:
user_id (str):
device_level (str):
device_name (str):
"""
user_id: str = field(metadata={"alias": "userId"})
device_level: str = field(metadata={"alias": "deviceLevel"})
device_name: str = field(metadata={"alias": "deviceName"})
|
Responses
Bases: OCIDataResponse
Response to UserSingleSignOnCreateDeviceTokenRequest.
Attributes:
Source code in src/mercury_ocip/commands/commands.py
| @dataclass(kw_only=True)
class UserSingleSignOnCreateDeviceTokenResponse(OCIDataResponse):
"""Response to UserSingleSignOnCreateDeviceTokenRequest.
Attributes:
device_token (str):
"""
device_token: str = field(metadata={"alias": "deviceToken"})
|
Bases: OCIResponseSource 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 UserSingleSignOnCreateDeviceTokenRequest
client = Client()
command = UserSingleSignOnCreateDeviceTokenRequest(
user_id=...,
device_level=...,
device_name=...,
)
response = client.command(command)
print(response)
Example 2 with Raw Command
from mercury_ocip.client import Client
client = Client()
response = client.raw_command("UserSingleSignOnCreateDeviceTokenRequest",
user_id=...,
device_level=...,
device_name=...,
)
print(response)