Skip to content

Commit

Permalink
Fix a little
Browse files Browse the repository at this point in the history
  • Loading branch information
mmiyajima2 committed Feb 18, 2019
1 parent 13bb671 commit 527b5e8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
16 changes: 12 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@ language: python

matrix:
include:
- python: 3.6
- python: 3.7
dist: xenial
sudo: true
- python: 3.6
- python: 3.7
dist: xenial
sudo: true

install:
- pip install tox-travis

script:
- tox

deploy:
provider: pypi
uesr: mmiyajima2
password:
secure: dcZEiEZr6dIKq8mgEZp894FZ7uOf1kKpIaqQ6pFBw+UoxWLGFGuUjBNQ41cCinbTusa6tVrDwOSNUbWRs93K01DyxixfYZlRMKwZH9elQcVMcJvLlBa3FqEWf4DGPALsIKdpYI/m3T7M+is77Wx+uULbllR8O1yw9AFyEGBIG/6fUfff/2lvQiHmDeOxJCFz8R1cK2wiBeSeTO8aIiGzVJ1W9d0RwjrANCKjZIHEsWh/P1puLDxZz2VGfIQa+qb1ZA55MxOn2FD7T1FrZDHnCHm3+BqBu/53ixZYl/Lbn3ZUvDeqowx7dfaq/68QbcHfNfi67lSBKJ/13qkkkAp6Eklwcnu8/L9FZeWuQwTXmCQzbKPE7lfheF6E95swRdAmPsAmbgsFUumJROOEbiky77xyp0Lnv00Rr5io/JCCq4iMt+gPDd/PQ6PTV6qP7CKow5PUU5Cof7NuXs98lDieQSBoarwgaUAgTwnEgojajTa5gyyBZoGnCMhUQ6aNQkAIAJS1HojlwU7dONZ1VW+EjqUdGgEOa4qECdy7Mx0ODhZKu8Rud4BJmyy7FUfu+E4xMZnjaejmk/G7pAJSPaU0DIfLt5OKK7J3NaMVAR62Daunl7fqa8FJ41QzHODmUS9m+Z2rW/ZdCGhi+tQoARnCOtV9kMmRooNnsw9uupQFtxQ=
on:
branch: master
7 changes: 5 additions & 2 deletions kantanoidc/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ def get(self, request, *args, **kwargs):
code = request.GET.get('code')
stored_nonce = request.session['stored_nonce']
sub = client.get_sub(code, stored_nonce)
logger.debug('sub=%s', sub)
user = User.objects.get_by_natural_key(sub)
try:
user = User.objects.get_by_natural_key(sub)
except User.DoesNotExist as e:
logger.error('username=%s, does not exists', sub)
raise e
login(request, user)
nexturl = client.build_nexturl(request)
return HttpResponseRedirect(nexturl)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def read(fname):

setup(
name='djangokantanoidc',
version='0.0.1',
version='0.0.2',
packages=['kantanoidc'],
license='MIT',
description='Helper app as oidc client',
Expand Down

0 comments on commit 527b5e8

Please sign in to comment.