Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过身份验证创建gitlab oauth令牌_Oauth_Gitlab_Gitlab Omnibus - Fatal编程技术网

通过身份验证创建gitlab oauth令牌

通过身份验证创建gitlab oauth令牌,oauth,gitlab,gitlab-omnibus,Oauth,Gitlab,Gitlab Omnibus,根据,POSTing到/oauth/token与 { "grant_type" : "password", "username" : "user@example.com", "password" : "sekret" } 应该用类似的方式来回应 { "access_token": "1f0af717251950dbd4d73154fdf0a474a5c5119adad999683f5b450c460726aa", "token_type": "be

根据,
POST
ing到
/oauth/token

{
  "grant_type"    : "password",
  "username"      : "user@example.com",
  "password"      : "sekret"
}
应该用类似的方式来回应

{
  "access_token": "1f0af717251950dbd4d73154fdf0a474a5c5119adad999683f5b450c460726aa",
  "token_type": "bearer",
  "expires_in": 7200
}
但是,我的gitlab服务器似乎决定用
404
响应此请求:

$ http POST $GITLAB_API_HOST/api/v3/oauth/token grant_type=password username=$GITLAB_USERNAME password=$GITLAB_PASSWORD
HTTP/1.1 404 Not Found
Connection: keep-alive
Content-Length: 36
Content-Type: application/json; charset=utf-8
Date: Mon, 16 May 2016 03:24:16 GMT
Server: nginx
Status: 404 Not Found
X-Request-Id: a6dc1303-f1e8-43a2-8c47-227d5de533c7
X-Runtime: 0.003662

{
    "error": "Not Found", 
    "status": "404"
}

我找不到这个流程的工作示例。在我的gitlab(ee)安装上启用此端点需要做些什么吗?

显然,这些令牌的端点不在
api/VERSION

http POST $GITLAB_API_HOST/oauth/token grant_type=password username=$GITLAB_USERNAME password=$GITLAB_PASSWORD                                   2.3.0 master ●●
HTTP/1.1 200 OK
Cache-Control: no-store
Content-Length: 226
Content-Type: application/json; charset=utf-8
Date: Mon, 16 May 2016 03:33:11 GMT
Etag: W/"6431af790cc9c53891e0cb58b64d845c"
Pragma: no-cache
Server: nginx
Status: 200 OK
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: 6fafc1a6-eaef-4c39-aa81-6d8fcf40a196
X-Runtime: 0.150464
X-Xss-Protection: 1; mode=block

{
    "access_token": "5b4a8a98d009bb569f4302d98f2aafe5362b7a06c1b12367a9658172b993c6c8", 
    "created_at": 1463369591, 
    "refresh_token": "57cfe9a90eabe0ed70336d7aad91f16bfa437e50d6d6f0b88de0e20c2e02167f", 
    "scope": "api", 
    "token_type": "bearer"
}

*不是真正的代币

证实了这在他们身上不起作用已经有一段时间了,但我想是的