POST | /authorizeuserfast/{Service}/{Profile} |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AuthorizeFastBaseResponse:
is_authorized: bool = False
settings: Optional[Dict[str, str]] = None
suggested_status_code: int = 0
suggested_response_message: Optional[str] = None
reason: Optional[str] = None
customer_id: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AuthorizeUserFastResponse(AuthorizeFastBaseResponse, IAuthorizeUserResponse):
user_object_id: Optional[str] = None
user_tenant: Optional[str] = None
user_tenant_id: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AuthorizeUserFast(IAuthorizeUser):
bearer_token: Optional[str] = None
customer_context: Optional[str] = None
# @ApiMember(ExcludeInSchema=true, IsRequired=true, ParameterType="path")
profile: Optional[str] = None
# @ApiMember(ExcludeInSchema=true, IsRequired=true, ParameterType="path")
service: Optional[str] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /authorizeuserfast/{Service}/{Profile} HTTP/1.1
Host: nkapi-sgepz3-auth-r1.azurewebsites.net
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"bearerToken":"String","customerContext":"String","profile":"String","service":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"userTenant":"String","userTenantId":"String","isAuthorized":false,"settings":{"String":"String"},"suggestedStatusCode":0,"suggestedResponseMessage":"String","reason":"String"}