示例 Spring OAuth2.0 服务器的卷曲错误?
Error on curl for sample Spring OAuth2.0 server?
我正在尝试使用本指南设置示例 OAuth2.0 服务器。
https://github.com/spring-projects/spring-security-oauth/tree/master/tests/annotation
按照自述文件中的说明,我启动服务器:
$ cd vanilla
$ mvn package
$ java -jar target/*.jar
然而,当我 运行
curl -H "Accept: application/json"
my-client-with-secret:secret@localhost:8080/oauth/token -d
grant_type=client_credentials{... "access_token":
"b561ff06-4259-466e-92d8-781db1a51901", ...}
我明白了
Could not resolve host: access_token curl: (6) Could not resolve host:
b561ff06-4259-466e-92d8-781db1a51901,
报错提示很大。你需要引用你的论点。
阅读on github后,您必须发出的命令是
curl -H "Accept: application/json" my-client-with-secret:secret@localhost:8080/oauth/token -d grant_type=client_credentials
(通常当行以 $
开头时,它是下一个命令 is/are 结果)
我正在尝试使用本指南设置示例 OAuth2.0 服务器。
https://github.com/spring-projects/spring-security-oauth/tree/master/tests/annotation
按照自述文件中的说明,我启动服务器:
$ cd vanilla
$ mvn package
$ java -jar target/*.jar
然而,当我 运行
curl -H "Accept: application/json" my-client-with-secret:secret@localhost:8080/oauth/token -d grant_type=client_credentials{... "access_token": "b561ff06-4259-466e-92d8-781db1a51901", ...}
我明白了
Could not resolve host: access_token curl: (6) Could not resolve host: b561ff06-4259-466e-92d8-781db1a51901,
报错提示很大。你需要引用你的论点。
阅读on github后,您必须发出的命令是
curl -H "Accept: application/json" my-client-with-secret:secret@localhost:8080/oauth/token -d grant_type=client_credentials
(通常当行以 $
开头时,它是下一个命令 is/are 结果)