Example #1
0
    def _extract_params(self):
        client_id, client_secret = extract_client_auth(self.request)

        self.params['client_id'] = client_id
        self.params['client_secret'] = client_secret
        self.params['redirect_uri'] = self.request.POST.get('redirect_uri', '')
        self.params['grant_type'] = self.request.POST.get('grant_type', '')
        self.params['code'] = self.request.POST.get('code', '')
        self.params['state'] = self.request.POST.get('state', '')
        self.params['scope'] = self.request.POST.get('scope', '')
        self.params['refresh_token'] = self.request.POST.get('refresh_token', '')
        # PKCE parameter.
        self.params['code_verifier'] = self.request.POST.get('code_verifier')

        self.params['username'] = self.request.POST.get('username', '')
        self.params['password'] = self.request.POST.get('password', '')
    def _extract_params(self):
        client_id, client_secret = extract_client_auth(self.request)

        self.params['client_id'] = client_id
        self.params['client_secret'] = client_secret
        self.params['redirect_uri'] = self.request.POST.get('redirect_uri', '')
        self.params['grant_type'] = self.request.POST.get('grant_type', '')
        self.params['code'] = self.request.POST.get('code', '')
        self.params['state'] = self.request.POST.get('state', '')
        self.params['scope'] = self.request.POST.get('scope', '')
        self.params['refresh_token'] = self.request.POST.get('refresh_token', '')
        # PKCE parameter.
        self.params['code_verifier'] = self.request.POST.get('code_verifier')

        self.params['username'] = self.request.POST.get('username', '')
        self.params['password'] = self.request.POST.get('password', '')
Example #3
0
    def _extract_params(self):
        client_id, client_secret = extract_client_auth(self.request)

        self.params['client_id'] = client_id
        self.params['client_secret'] = client_secret

        if settings.get('OIDC_ALLOW_PARAMS_JSON_BODY'):
            body_unicode = self.request.body.decode('utf-8')
            body = json.loads(body_unicode)
            b_dict = dict(body)
            self.params['redirect_uri'] = b_dict.get('redirect_uri', '')
            self.params['grant_type'] = b_dict.get('grant_type', '')
            self.params['code'] = b_dict.get('code', '')
            self.params['state'] = b_dict.get('state', '')
            self.params['scope'] = b_dict.get('scope', '')
            self.params['refresh_token'] = b_dict.get('refresh_token', '')
            # PKCE parameter.
            self.params['code_verifier'] = b_dict.get('code_verifier', '')

            self.params['username'] = b_dict.get('username', '')
            self.params['password'] = b_dict.get('password', '')
        else:
            self.params['redirect_uri'] = self.request.POST.get(
                'redirect_uri', '')
            self.params['grant_type'] = self.request.POST.get('grant_type', '')
            self.params['code'] = self.request.POST.get('code', '')
            self.params['state'] = self.request.POST.get('state', '')
            self.params['scope'] = self.request.POST.get('scope', '')
            self.params['refresh_token'] = self.request.POST.get(
                'refresh_token', '')
            # PKCE parameter.
            self.params['code_verifier'] = self.request.POST.get(
                'code_verifier')

            self.params['username'] = self.request.POST.get('username', '')
            self.params['password'] = self.request.POST.get('password', '')
Example #4
0
 def _extract_params(self):
     # Introspection only supports POST requests
     self.params['token'] = self.request.POST.get('token')
     client_id, client_secret = extract_client_auth(self.request)
     self.params['client_id'] = client_id
     self.params['client_secret'] = client_secret
 def _extract_params(self):
     # Introspection only supports POST requests
     self.params['token'] = self.request.POST.get('token')
     client_id, client_secret = extract_client_auth(self.request)
     self.params['client_id'] = client_id
     self.params['client_secret'] = client_secret