Skip to content

[2][8]Login, Logout and JWT authorization #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 27, 2019

Conversation

jacekkalbarczyk
Copy link
Contributor

Added login and logout endpoints.Created new db table for JWT tokens blacklisting.

except ValidationError as error:
return jsonify({"msg": "Wrong input data",
"errors": error.messages}), 400

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It returns two separate error messages at once. Is it intended?

{
    "errors": {
        "username": [
            "Shorter than minimum length 5."
        ]
    },
    "msg": "Wrong input data"
}

return jsonify(ret), 201
else:
return jsonify({"msg": "Not authorized"}), 401

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We maybe should create separate issue for refresh_token, and all related to it things like refreshing endpoint, and refresh logout?

@OtisRed OtisRed merged commit d878f51 into CodeForPoznan:master Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants