mirror of https://github.com/usbharu/Hideout.git
chore: httpクライアントの整備
http-client.private.env.jsonを/api/v1/appsを実行した結果と以下の内容を合わせて作成することで使える { "dev": { "client_id": "", "client_secret": "", "host": "localhost:8081" } }
This commit is contained in:
parent
456df222f2
commit
1115590ab2
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"dev": {
|
||||||
|
"name": "value",
|
||||||
|
"Security": {
|
||||||
|
"Auth": {
|
||||||
|
"auth-id": {
|
||||||
|
"Type": "OAuth2",
|
||||||
|
"Grant Type": "Authorization Code",
|
||||||
|
"Client ID": "{{client_id}}",
|
||||||
|
"Client Secret": "{{client_secret}}",
|
||||||
|
"Redirect URL": "https://example.com",
|
||||||
|
"Token URL": "http://{{host}}/oauth/token",
|
||||||
|
"Auth URL": "http://{{host}}/oauth/authorize",
|
||||||
|
"Scope": "write read"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
POST http://{{host}}/api/v1/apps
|
||||||
|
Accept: application/json
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"client_name": "test-client",
|
||||||
|
"redirect_uris": "https://example.com",
|
||||||
|
"scopes": "write read"
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
GET http://{{host}}/api/v1/accounts/verify_credentials
|
||||||
|
Authorization: Bearer {{$auth.token("auth-id")}}
|
Loading…
Reference in New Issue