authorize_api.yml 1.0 KB
name: 登录价值系统
base_url: ${ENV(base_url)}
verify: False
#teardown_hooks:
#    - ${teardown_hook_get_authcode($response)}
variables:
    currtime1: ${make_time()}
    uuid1: ${make_uuid()}
    access_token1: ''
    sign1: ${make_sign($currtime1, $uuid1,$access_token1)}
    credentials: $credentials
    cuid: $cuid
    muid: $muid
    cid: ${ENV(companyid)}
request:
    headers:
        Content-Type: application/json;charset=utf-8
        User-Agent: abilityIOSTest/120004 CFNetwork/1121.2.2 Darwin/19.3.0
        X-MMM-AppName: com.maimaimai.abilityIOS
        X-MMM-AccessToken: $access_token1
        X-MMM-AppProject: ability
        X-MMM-DeviceType: '0'
        X-MMM-Sign: $sign1
        X-MMM-Timestamp: $currtime1
        X-MMM-Uuid: $uuid1
        X-MMM-Version: 0.12.0
    json:
        clientId: lks3Z8Ncn2j
        credentials: $credentials
        cuid: $cuid
        muid: $muid
        cid: ${ENV(companyid)}
    method: POST
    url: /v1/auth/authorize
extract:
    authCode: content.data.authCode
validate:
-   eq:
    - content.code
    - 0