def post(self):
     # get the post data
     post_data = request.json
     resp = Authentication.login_user(data=post_data)
     if resp[1] != 200:
         return abort(403, resp[0])
     else:
         return resp
Пример #2
0
    def post(self):
        # get the post data
        post_data = request.json
        resp = Authentication.login_user(data=post_data)

        if resp[1] != 200:
            return resp
        else:
            access_token = create_access_token(identity=resp[0]['username'])
            refresh_token = create_refresh_token(identity=resp[0]['username'])

            resp[0]['access_token'] = access_token
            resp[0]['refresh_token'] = refresh_token

            return resp
 def post(self, token):
     return Authentication.reset_password_with_token(token)
 def get(self, token):
     return Authentication.confirm_reset_token_service(token)
 def post(self):
     post_data = request.json
     return Authentication.reset_password_mail(data=post_data)
 def post(self):
     post_data = request.json
     return Authentication.signup_user(data=post_data)
 def get(self):
     return Authentication.logout_user()
 def post(self):
     post_data = request.json
     return Authentication.change_user_password(post_data)
Пример #9
0
 def post(self):
     # get the post data
     post_data = request.json
     return Authentication.login_user(data=post_data)
Пример #10
0
 def post(self):
     data = request.json
     return Authentication.resend_verification(data)
Пример #11
0
    def post(self):
        post_data = request.json
        send_mail = request.args.get('send_mail')
        resp = Authentication.signup_user(data=post_data, send_mail=send_mail)

        return resp