Beispiel #1
0
 def test_can_instrospect_token(self, request):
     request.return_value.json.return_value = self.token_response
     c = Client(**self.data)
     c.instrospect_token(self.token)
     data = {'token': 'super-token'}
     request.assert_called_with(
         'POST', 'http://localhost:4445/oauth2/introspect',
         data=data)
Beispiel #2
0
 def test_can_instrospect_token(self, request):
     request.return_value.json.return_value = self.token_response
     c = Client(**self.data)
     c.instrospect_token(self.token)
     headers = {'Authorization': 'bearer super-token'}
     data = {'token': 'super-token'}
     request.assert_called_with('POST',
                                'http://localhost/oauth2/introspect',
                                data=data,
                                headers=headers)