跳到主要内容

Data

GetRbac

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

curl -X GET "${baseUrl}/config/rbac/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

GetRbacUserRight

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

curl -X GET "${baseUrl}/config/rbac/user/right/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

LoginByEmail

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

curl -X POST "${baseUrl}/login/email/" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @credential.json
信息
credential.json
{
"email":"your-email@gostartkit.com",
"password":"your-password"
}
提示

success status: 201

LoginByPhone

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

curl -X POST "${baseUrl}/login/phone/" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @credential.json
信息
credential.json
{
"phone":"your-phone",
"password":"your-password"
}
提示

success status: 201

GetUserRightByAppKey

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

curl -X GET "${baseUrl}/authorize/:appKey" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

ChangePassword

RefreshToken

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

curl -X PATCH "${baseUrl}/authorize/refresh/token/" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @token.json
信息
token.json
{
"userID": 0,
"refreshToken":"your-refreshToken"
}

GetUserRight

GetRoleRight

GetMyInfo