You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a Flask-RESTful API and I'm trying to implement basic authentication using the HTTPBasicAuth class. I've included the authorizations dictionary in my API definition, but I'm encountering an issue where the credentials are not being verified when I use the "authorizationURL" parameter.
I expect that the credentials should be verified by sending them to a API endpoint, and should be validated when they are added from the authorize button.
Actual Behavior:
The credentials even if they are wrong are stored when added through the "Authorize" button and when the API endpoint is hit, a browser pop-up box appears which asks for username and password again, but then upon adding the right credentials there, the wrong credentials(added via the authorize button) are sent to the API instead of new one
How can I use the authorize button to validate the credentials ?
The text was updated successfully, but these errors were encountered:
I'm working on a Flask-RESTful API and I'm trying to implement basic authentication using the HTTPBasicAuth class. I've included the authorizations dictionary in my API definition, but I'm encountering an issue where the credentials are not being verified when I use the "authorizationURL" parameter.
from flask import Blueprint from flask_restful import Api, HTTPBasicAuth api_v2_blueprint = Blueprint("api_v2", __name__) authorizations = { 'basicAuth': { 'type': 'basic', 'in': 'header', 'name': 'Authorization', 'authorizationUrl': 'https://xyz.com/login' } } api = Api( api_v2_blueprint, title="Api for tool1", version="2.0", description="Rest Api", authorizations=authorizations, security=authorizations ) auth = HTTPBasicAuth()
Expected Behavior:
I expect that the credentials should be verified by sending them to a API endpoint, and should be validated when they are added from the authorize button.
Actual Behavior:
The credentials even if they are wrong are stored when added through the "Authorize" button and when the API endpoint is hit, a browser pop-up box appears which asks for username and password again, but then upon adding the right credentials there, the wrong credentials(added via the authorize button) are sent to the API instead of new one
How can I use the authorize button to validate the credentials ?
The text was updated successfully, but these errors were encountered: