testing
This commit is contained in:
parent
84ccfd720e
commit
11be74c2ad
8
app.py
8
app.py
@ -42,12 +42,12 @@ def test_data():
|
||||
)
|
||||
client_metadata = {
|
||||
"client_name": "Test client",
|
||||
"client_uri": "data:text/html;charset=utf-8,client-uri",
|
||||
"client_uri": "https://social.yandex.net",
|
||||
"grant_types": ['authorization_code', 'refresh_token'],
|
||||
"redirect_uris": "data:text/html;charset=utf-8,redirect-uri",
|
||||
"redirect_uris": "https://social.yandex.net/broker/redirect",
|
||||
"response_types": ['code', 'token'],
|
||||
"scope": 'profile',
|
||||
"token_endpoint_auth_method": 'client_secret_basic'
|
||||
"token_endpoint_auth_method": 'client_secret_post'
|
||||
}
|
||||
client.set_client_metadata(client_metadata)
|
||||
client.client_secret = gen_salt(48)
|
||||
@ -63,7 +63,7 @@ if __name__ == '__main__':
|
||||
|
||||
# http://127.0.0.1:5000/oauth/authorize?scope=profile&response_type=code&client_id=rrC8VDll9RRbBjNLhY4T9jDO
|
||||
|
||||
# > curl -u rrC8VDll9RRbBjNLhY4T9jDO:CxKyWG8Z972hkLQq7hMblH7BsP4JWtQn7qahqzW15h5ZUUJI -XPOST "http://127.0.0.1:5000/oauth/token" -F client_id=rrC8VDll9RRbBjNLhY4T9jDO -F client_secret=CxKyWG8Z972hkLQq7hMblH7BsP4JWtQn7qahqzW15h5ZUUJI -F grant_type=authorization_code -F code=wur5zaxmDfxK9Qsvvebqz1N0XKa7zewSrNYJJAYHlZGfsOJa
|
||||
# > curl -XPOST "http://127.0.0.1:5000/oauth/token" -F client_id=rrC8VDll9RRbBjNLhY4T9jDO -F client_secret=CxKyWG8Z972hkLQq7hMblH7BsP4JWtQn7qahqzW15h5ZUUJI -F grant_type=authorization_code -F code=wur5zaxmDfxK9Qsvvebqz1N0XKa7zewSrNYJJAYHlZGfsOJa
|
||||
# < {"access_token": "LBdvuoKeiY9tHJKMoLdvrG8Zfqs4FbPOz1ze0Ahv96", "expires_in": 864000, "scope": "profile", "token_type": "Bearer"}
|
||||
|
||||
# > curl -H "Authorization: Bearer LBdvuoKeiY9tHJKMoLdvrG8Zfqs4FbPOz1ze0Ahv96" "http://127.0.0.1:5000/api/me"
|
||||
|
Loading…
Reference in New Issue
Block a user