Retrieves authentication credentials.
POST
/auth/tokenThis is one of the only two endpoints where fields are named in snake case, both in the request and in the
response.
It's also one that responds without following the PhiZoneApi.Dtos.Responses.ResponseDto`1 structure.
Refer to RFC 6749 for further information.
请求参数
Query 参数
provider
string
可选
redirectUri
string
可选
tapApplicationId
string
可选
token
string
可选
Body 参数application/x-www-form-urlencoded
client_id
string
必需
The client's ID, "public" for general use.
client_secret
string
可选
The client's secret. Optional.
grant_type
string
必需
The grant type desired, either password
or refresh_token
.
username
string
可选
The user's email address, e.g. "contact@phi.zone", when the grant type is password
.
password
string
可选
The user's password, when the grant type is password
.
refresh_token
string
可选
The user's refresh token, when the grant type is refresh_token
.
示例代码
返回响应
Returns authentication credentials.(200)
When any of the parameters is invalid.(400)
When any of the client credentials is invalid.(401)
When the user
1. has input an incorrect password (`invalid_grant`);
2. is temporarily locked out (`temporarily_unavailable`);
3. is permanently locked out (`access_denied`);
4. has not yet confirmed their email address (`interaction_required`), in whi(403)
When
1. using Direct mode and the user has input an email address that does not match any existing user;
2. using any other mode and the union ID / remote user ID does not match any existing user.(404)
Returns authentication credentials.
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
No schema defined
示例
未设置
修改于 1 个月前