auth
auth ¶
AccountLockedError ¶
AccountLockedError(res=None, **kwargs)
Bases: AuthError
Raised when the user account is locked.
Source code in src/crew_dcs/routes/auth.py
45 46 47 48 49 50 | |
AuthError ¶
AuthError(res: Any | None = None, **kwargs)
Bases: DomoError
Exception for authentication-related errors.
Source code in src/crew_dcs/base/exceptions.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
InvalidAuthTypeError ¶
InvalidAuthTypeError(
res=None,
required_auth_type: Any | None = None,
required_auth_type_ls: list[Any] | None = None,
**kwargs
)
Bases: AuthError
Raised when an invalid authentication type is used for an API call.
Source code in src/crew_dcs/routes/auth.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
InvalidCredentialsError ¶
InvalidCredentialsError(res=None, **kwargs)
Bases: AuthError
Raised when invalid credentials are provided to the API.
Source code in src/crew_dcs/routes/auth.py
34 35 36 37 38 39 | |
InvalidInstanceError ¶
InvalidInstanceError(
res=None, domo_instance: str | None = None, **kwargs
)
Bases: AuthError
Raised when an invalid Domo instance is provided.
Source code in src/crew_dcs/routes/auth.py
85 86 87 88 89 90 91 92 93 94 95 96 | |
NoAccessTokenReturnedError ¶
NoAccessTokenReturnedError(res=None, **kwargs)
Bases: AuthError
Raised when no access token is returned from the authentication API.
Source code in src/crew_dcs/routes/auth.py
102 103 104 105 106 107 | |
elevate_user_otp
async
¶
elevate_user_otp(
auth: Any,
one_time_password: str,
user_id: str | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Elevate authentication using a one-time password (OTP).
This function is used when multi-factor authentication is enabled and an additional OTP verification step is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
Any
|
Authentication object containing domo_instance and tokens |
required |
one_time_password
|
str
|
The OTP code for authentication elevation |
required |
user_id
|
str | None
|
User ID (will be retrieved from auth if not provided) |
None
|
context
|
RouteContext | None
|
Route context for request configuration |
None
|
**context_kwargs
|
Additional context parameters (debug_api, session, parent_class, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
rgd.ResponseGetData: Response from the OTP elevation request |
Raises:
| Type | Description |
|---|---|
InvalidCredentialsError
|
If the OTP is invalid or elevation fails |
Source code in src/crew_dcs/routes/auth.py
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | |
get_developer_auth
async
¶
get_developer_auth(
domo_client_id: str,
domo_client_secret: str,
auth: Any | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Authenticate using OAuth2 client credentials for developer APIs.
This function is specifically for authenticating against APIs documented under developer.domo.com using OAuth2 client credentials flow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domo_client_id
|
str
|
OAuth2 client ID from developer app registration |
required |
domo_client_secret
|
str
|
OAuth2 client secret |
required |
auth
|
Any | None
|
Existing auth object (optional) |
None
|
return_raw
|
bool
|
Whether to return raw response without processing |
False
|
context
|
RouteContext | None
|
Route context for request configuration |
None
|
**context_kwargs
|
Additional context parameters (debug_api, session, parent_class, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
rgd.ResponseGetData: Response containing access token or error information |
Raises:
| Type | Description |
|---|---|
InvalidCredentialsError
|
If the client credentials are invalid |
Source code in src/crew_dcs/routes/auth.py
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | |
get_full_auth
async
¶
get_full_auth(
domo_instance: str,
domo_username: str,
domo_password: str,
auth: Any | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Authenticate using username and password to retrieve a full_auth access token.
This function uses Domo's standard username/password authentication to obtain a session token that can be used for subsequent API calls.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domo_instance
|
str
|
The Domo instance identifier |
required |
domo_username
|
str
|
User's email address |
required |
domo_password
|
str
|
User's password |
required |
auth
|
Any | None
|
Existing auth object (optional) |
None
|
return_raw
|
bool
|
Whether to return raw response without processing |
False
|
context
|
RouteContext | None
|
Route context for request configuration |
None
|
**context_kwargs
|
Additional context parameters (debug_api, session, parent_class, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
rgd.ResponseGetData: Response containing session token or error information |
Raises:
| Type | Description |
|---|---|
InvalidInstanceError
|
If the Domo instance is invalid |
InvalidCredentialsError
|
If credentials are invalid or missing session token |
AccountLockedError
|
If the user account is locked |
NoAccessTokenReturned
|
If no access token is returned from the API |
Source code in src/crew_dcs/routes/auth.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
who_am_i
async
¶
who_am_i(
auth: Any,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Validate authentication against the 'me' API endpoint.
This function validates the authentication token by calling Domo's user 'me' API. This is the same authentication test the Domo Java CLI uses.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
Any
|
Authentication object containing domo_instance and auth tokens |
required |
return_raw
|
bool
|
Whether to return raw response without processing |
False
|
context
|
RouteContext | None
|
Route context for request configuration |
None
|
**context_kwargs
|
Additional context parameters (debug_api, session, parent_class, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
rgd.ResponseGetData: Response containing user information or error details |
Raises:
| Type | Description |
|---|---|
InvalidInstanceError
|
If the Domo instance is invalid (403 Forbidden) |
InvalidCredentialsError
|
If the authentication token is invalid |
Source code in src/crew_dcs/routes/auth.py
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | |