Skip to content

Commit

Permalink
Update oic dependency (#65)
Browse files Browse the repository at this point in the history
* Changed oic dependency to latest version (oic==1.1.2).
Add expected token_type to tests.
Change import path.

* Python 3.4 has reached its end-of-life. Remove support.
  • Loading branch information
josteinl authored and zamzterz committed Dec 4, 2019
1 parent 0fe30f0 commit fad61a5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ matrix:
env: TOXENV=py36
- python: 3.5
env: TOXENV=py35
- python: 3.4
env: TOXENV=py34

install:
- pip install -U setuptools tox
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
author_email='[email protected]',
description='Flask extension for OpenID Connect authentication.',
install_requires=[
'oic==0.12',
'oic==1.1.2',
'Flask',
'requests'
],
Expand Down
3 changes: 2 additions & 1 deletion src/flask_pyoidc/pyoidc_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
import json

import logging
from oic.oic import Client, ProviderConfigurationResponse, RegistrationResponse, AuthorizationResponse, \
from oic.oic import Client, RegistrationResponse, AuthorizationResponse, \
AccessTokenResponse, TokenErrorResponse, AuthorizationErrorResponse
from oic.oic.message import ProviderConfigurationResponse
from oic.utils.authn.client import CLIENT_AUTHN_METHOD

logger = logging.getLogger(__name__)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_flask_pyoidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def test_handle_implicit_authentication_response(self, time_mock, utc_time_sans_
authn = self.init_app(provider_metadata_extras={'userinfo_endpoint': userinfo_endpoint})
state = 'test_state'
auth_response = AuthorizationResponse(
**{'state': state, 'access_token': access_token, 'id_token': id_token_jwt})
**{'state': state, 'access_token': access_token, 'token_type': 'Bearer', 'id_token': id_token_jwt})
with self.app.test_request_context('/redirect_uri?{}'.format(auth_response.to_urlencoded())):
UserSession(flask.session, self.PROVIDER_NAME)
flask.session['destination'] = '/'
Expand All @@ -268,7 +268,7 @@ def test_handle_authentication_response_POST(self):
state = 'test_state'

authn = self.init_app()
auth_response = AuthorizationResponse(**{'state': state, 'access_token': access_token})
auth_response = AuthorizationResponse(**{'state': state, 'token_type': 'Bearer', 'access_token': access_token})

with self.app.test_request_context('/redirect_uri',
method='POST',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py34,py35,py36,py37,py38
envlist = py35,py36,py37,py38

[testenv]
commands = py.test tests/ example/
Expand Down

0 comments on commit fad61a5

Please sign in to comment.