| POST | /v1/User/RefreshToken | Refresh user token before timeout |
|---|
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 Account:
gas_user_id: Optional[str] = None
user_id: int = 0
user_role_id: Optional[List[int]] = None
user_role_redirect_url: Optional[str] = None
user_token: Optional[str] = None
retailer_group_id: Optional[str] = None
modified: datetime.datetime = datetime.datetime(1, 1, 1)
exists: bool = False
default_vehicle_type: Optional[str] = None
default_retailer_gssn: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RefreshUserTokenResponse:
account: Optional[Account] = None
is_valid: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RefreshUserTokenRequest(IPost):
pass
Python RefreshUserTokenRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/User/RefreshToken HTTP/1.1
Host: prod-api-auth-mb-dhc.rapp-customers.co.uk
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Account:
{
GasUserId: String,
UserId: 0,
UserRoleId:
[
0
],
UserRoleRedirectUrl: String,
UserToken: 00000000000000000000000000000000,
RetailerGroupId: String,
Modified: 0001-01-01,
Exists: False,
DefaultVehicleType: String,
DefaultRetailerGssn: String
},
IsValid: False
}