Skip to content
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

Implicit grant flow #554

Open
testphys opened this issue Feb 8, 2018 · 1 comment
Open

Implicit grant flow #554

testphys opened this issue Feb 8, 2018 · 1 comment

Comments

@testphys
Copy link

testphys commented Feb 8, 2018

Since there is no documentation for using the implicit grant flow, I am having a hard time figuring out what the actual request should look like.

curl -X GET -d "username=<username>&password=<password>&clientid=<client_id>&redirect_uri=<redirect_uri>&response_type=token http://0.0.0.0:8000/o/authorize/

From looking into the code the user has to already be authenticated. Isn't it possible to pass the user credentials with the actual request?

class LoginRequiredMixin(AccessMixin):
    """Verify that the current user is authenticated."""
    def dispatch(self, request, *args, **kwargs):
        if not request.user.is_authenticated:
            return self.handle_no_permission()
        return super().dispatch(request, *args, **kwargs)

Furthermore, the body of the GET request seems to get lost.

def extract_body(self, request):
    """
    Extracts the POST body from the Django request object
    :param request: The current django.http.HttpRequest object
    :return: provided POST parameters
    """
    return request.POST.items()

I would appreciate a little help to get my head around it.

@manelclos
Copy link
Member

Hi @testphys, from my limited understanding, I'd say that the authorize endpoint, for using the implicit flow, is about showing the user a web page for authorizing the client app. In my case, I'm automatically authenticating users using REMOTE_USER, but the webpage is still shown to users so they can decide wether or not authorize the client app.

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

No branches or pull requests

2 participants