Eve(Token Authentication)

Created at 2016-01-07 Updated at 2024-04-17 - 1 min. read Category experience / work Tag authentication / authorization / eve / tokrn

eve-sidebarI was working on eve. It is an open source Python REST API framework designed for human beings. It allows to effortlessly build and deploy highly customizable, fully featured RESTful Web Services. It is powered by Flask, Redis, Cerberus, Events and offers support for both MongoDB and SQL backends.

Token-based authentication can be considered a specialized version of Basic Authentication. The Authorization header tag will contain the auth token as the username, and no password.

I was trying to implement this example. Suddenly i was stuck while verifying the authentication. It always report 401 unauthorized error with postman. then i jumped to IRC, stack overflow and everywhere i could, to find the solution to this issue. Finally after a time i figured out the problem.

The things which have to be taken care are :

  • Authorization should be passed in header of requesttoken
  • Header->Authorization ; Value->Basic[space][key_value]
  • key_value->base64 encoded(token)token1
  • token should end with “:
    Base 64 encoding of token can be done here. Just remember your token should end with : . As the token authentication of eve, picks the decoded part of token before : only.

Enjoy the response 200 ;)

Table of Content

Site by Ashutosh Kumar Singh using Hexo & Random

Traveller - Developer - Foodie - Biker - Cyclist - Rider - Technocrat