SpringSecurityOauth中token(Basic、Bearer)
用户名密码
username: SummerGao
password: 123456
Summergao:123456 的base64: U3VtbWVyZ2FvOjEyMzQ1Ng==
basic认证
下面两种方式等价:
curl http://SummerGao:123456@localhost:8080/test
curl -H "Authorization:Basic U3VtbWVyZ2FvOjEyMzQ1Ng==" http://localhost:8080/test
bearer授权访问
下面两种方式等价:
curl http://localhost:8081/test?access_token=a04a5592-08cf-4e15-a0d7-bc7d5f03295b
curl -H "Authorization:Bearer a04a5592-08cf-4e15-a0d7-bc7d5f03295b" http://localhost:8081/test
以上是 SpringSecurityOauth中token(Basic、Bearer) 的全部内容, 来源链接: utcz.com/z/517326.html