Implement v4 endpoints for OAuth (#6040)
* Implement POST /oauth/apps endpoint for APIv4
* Implement GET /oauth/apps endpoint for APIv4
* Implement GET /oauth/apps/{app_id} and /oauth/apps/{app_id}/info endpoints for APIv4
* Refactor API version independent oauth endpoints
* Implement DELETE /oauth/apps/{app_id} endpoint for APIv4
* Implement /oauth/apps/{app_id}/regen_secret endpoint for APIv4
* Implement GET /user/{user_id}/oauth/apps/authorized endpoint for APIv4
* Implement POST /oauth/deauthorize endpoint
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1a0f8d1b3c
Коммит
be9624e2ad
@@ -20,6 +20,17 @@ func TestAuthJson(t *testing.T) {
|
||||
if a1.Code != ra1.Code {
|
||||
t.Fatal("codes didn't match")
|
||||
}
|
||||
|
||||
a2 := AuthorizeRequest{}
|
||||
a2.ClientId = NewId()
|
||||
a2.Scope = NewId()
|
||||
|
||||
json = a2.ToJson()
|
||||
ra2 := AuthorizeRequestFromJson(strings.NewReader(json))
|
||||
|
||||
if a2.ClientId != ra2.ClientId {
|
||||
t.Fatal("client ids didn't match")
|
||||
}
|
||||
}
|
||||
|
||||
func TestAuthPreSave(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user