OAuth 2.0设置AccessToken

I am new with OAuth but because it looks very interesting, I wanted to take a look at it. I have read and viewed some tutorials and I understand the basics. I downloaded this BitBucket provider: https://github.com/stevenmaguire/oauth2-bitbucket which uses this client: https://github.com/thephpleague/oauth2-client

The thing I don't understand is: how do I set the accessToken? When there is no ?code in the url it redirects and adds it to the url, then I get the accessToken and the refreshToken but how do I use that accessToken? I've tried some things, also $provider->setAccessToken() but that function doesn't exist.

Hope someone can help me. It's probably pretty easy but I don't see it.

查看全部
doushaju4901
doushaju4901
2016/12/28 08:34
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复