Package: httpie-jwt-auth
JWTAuth (JSON Web Tokens)auth plugin forHTTPie.InstallationLatest stable version:$pipinstall-Uhttpie-jwt-authLatest developing version:$pipinstall-Uhttps://github.com/teracyhq/httpie-jwt-auth/archive/develop.zipThis version requires HTTPie v0.9.7 and above. If you can not use this new version, you can use:https://github.com/teracyhq/httpie-jwt-auth/tree/v0.2.1Supported HTTPie VersionSupports HTTPie >= 1.0.0httpie-jwt-authcan work with older versions of HTTPieUsageNormal:$http--auth-type=jwt--auth="<token>"example.org-hGET/HTTP/1.1Accept:*/*Accept-Encoding:gzip,deflateAuthorization:Token_PrefixabcConnection:keep-aliveHost:example.orgUser-Agent:HTTPie/0.9.7By default, theBearerprefix auth token is used, you can choose another prefix:$JWT_AUTH_PREFIX=JWThttp--auth-type=jwt--auth="<token>"example.org-hAlso by default, theAuthorizationauth header is used, but you can choose another one:$JWT_AUTH_HEADER=X-Foobar-Authorizationhttp--auth-type=jwt--auth="<token>"example.org-hSometimes you don’t need to expose the JWT token on the command line, you can use the environment variable:$exportJWT_AUTH_TOKEN=secretAnd it should work:$httpteracy.com--auth-type=jwt-vGET/HTTP/1.1Accept:*/*Accept-Encoding:gzip,deflateAuthorization:BearersecretConnection:keep-aliveHost:teracy.comUser-Agent:HTTPie/0.9.7You can combine the usage whatever you like for your cases.ContributingPlease create pull requests to thedevelopbranch by followinghttp://dev.teracy.org/docs/workflow.htmlDevelopingWe use Docker workflow for development now. To start developing:Make sure to use teracy-dev by following:http://dev.teracy.org/docs/getting_started.htmlFork this repo and clone to~/teracy-dev/workspace:$cd~/teracy-dev/workspace$gitclone<your_forked_repo>$cdhttpie-jwt-auth$gitremoteaddupstreamgit@github.com:teracyhq/httpie-jwt-auth.gitSSH into the VM to run commands as following:$cd~/teracy-dev$vagrantssh$ws$cdhttpie-jwt-auth$docker-composeup# to test all the supported httpie versions with the most used Python version$docker-composeuphttpie_latest# to test with the latest httpie version with the most used Python version$docker-compose-fdocker-compose.yml-fdocker-compose.py36.ymlup# to test all the supported httpie versions with Python 3.6Register your account athttps://travis-ci.organd enablehttpie-jwt-authrepoAdd the following settings to the travis-ci repo:DOCKER_USERfor the user or organization Docker namespaceDOCKER_USERNAMEfor the username of the Docker HubDOCKER_PASSWORDfor the password of the Docker HubIMG_REPOfor the docker repo on yourDOCKER_USERaccountIMG_REPO_PREFIXis optionalSee .travis.yml for detailsStart creating new Docker images to be shared within our communityFAQsHow to load JWT token from a file?$http--auth-type=jwt--auth="$(catmytoken.txt)"example.orgSee:https://github.com/teracyhq/httpie-jwt-auth/issues/4How to use auth prefix other than defaultBearer, for exampleToken_Prefixinstead?You could use environment variable to specifyJWT_AUTH_PREFIXfor permanent prefix usage:$exportJWT_AUTH_PREFIX=Token_Prefixand it should work:$httpteracy.com--auth-type=jwt--auth="abc"-vGET/HTTP/1.1Accept:*/*Accept-Encoding:gzip,deflateAuthorization:Token_PrefixabcConnection:keep-aliveHost:teracy.comUser-Agent:HTTPie/0.9.7or for one time usage only with the specified jwt auth prefix:$JWT_AUTH_PREFIX=Token_Prefixhttpteracy.com--auth-type=jwt--auth="abc"-vGET/HTTP/1.1Accept:*/*Accept-Encoding:gzip,deflateAuthorization:Token_PrefixabcConnection:keep-aliveHost:teracy.comUser-Agent:HTTPie/0.9.7DiscussionsJoin us:https://groups.google.com/forum/#!forum/teracyhttps://www.facebook.com/groups/teracyGet our news:https://www.facebook.com/teracyhqhttps://twitter.com/teracyhqAuthor and contributorsSee more details atAUTHORS.mdandCONTRIBUTORS.mdfiles.LicenseBSD LicenseCopyright (c) Teracy, Inc. and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice,
       this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.

    3. Neither the name of Teracy, Inc. nor the names of its contributors may be used
       to endorse or promote products derived from this software without
       specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.