Skip to content

yoophi/httpie-oauth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpie-oauth2

OAuth2 plugins for httpie

$ pip install git+http://github.com/yoophi/httpie-oauth2.git?#egg=httpie_oauth2

Usage

$ export API_KEY=api_key
$ export API_SECRET=api_secret
$ export AUTHORIZATION_URL=http://apihost/api/v1.0/auth/token
$ http --auth-type=oauth2 --auth=username:password GET http://apihost/api/v1.0/private/endpoint 

You can also use HTTPie sessions.

# Create session
$ http --session=dm --auth-type=oauth2 --auth=username:password GET http://apihost/api/v1.0/private/endpoint 
    
# Re-use auth
$ http --session=dm GET http://apihost/api/v1.0/private/endpoint 

TODO

httpie oauth plugins API does not permit yet to deal with token refresh

https 프로토콜을 사용중이 아닌 경우, 아래 환경변수를 세팅해서 사용가능.

$ export OAUTHLIB_INSECURE_TRANSPORT=1

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages