Commit graph

56 commits

Author SHA1 Message Date
Dillon Dixon
04c03787af Fix Django 2.0 deprecation warnings (#185)
* explicit default foreign key delete operations

* first iteration of Django 2.0 deprecation fixes
2017-08-10 11:38:50 +02:00
Jan Brauer
f78e2be3c5 Fix infinite login loop if "prompt=login" (#198)
* Add test to expose issue #197

* Strip 'login' from prompt before redirecting

This fixes #197. Otherwise the user would have to login once,
then is immediately logged out and prompted to login again.

* Only remove 'login' if present

* Don't append an empty prompt parameter

* Inline variable
2017-07-19 10:52:10 +02:00
Tuomas Suutari
5165312d01 Use stored user consent for public clients too (#189)
When using Implicit Flow, it should be OK to use the stored user consent
even if the client is public.  The redirect uri checks should make sure
that the stored consent of another client cannot be misused to get a
consent to a site that is not related to the client.

It is also important to support this, since public clients using
Implicit Flow do not have a refresh token to update their access tokens,
so only way to keep their login session open is by issuing authorization
requests from an iframe with the "prompt=none" parameter (which does not
work without the previously stored consent).  See the following links
for more info and examples on how to renew the access token with SPAs:

https://auth0.com/docs/api-auth/tutorials/silent-authentication#refresh-expired-tokens

https://damienbod.com/2017/06/02/

https://github.com/IdentityServer/IdentityServer3/issues/719#issuecomment-230145034
2017-07-07 13:18:36 +02:00
Wojciech Bartosiak
f07327a713 Bug #187 prompt handling (#188)
prompt parameter changed to list of strings not a simple string
2017-06-06 11:12:37 +02:00
Wojciech Bartosiak
a829726be8 Merge develop to v0.5.x (#179)
* Log create_uri_response exceptions to logger.exception

* Support grant type password - basics

* Add tests for Resource Owner Password Credentials Flow

* Password Grant -Response according to specification

* Better tests for errors, disable grant type password by default

* Add documentation for grant type password

* User authentication failure to return 403

* Add id_token to response

* skipping consent only works for confidential clients

* fix URI fragment

example not working URL `http://localhost:8100/#/auth/callback/`

* OIDC_POST_END_SESSION_HOOK + tests

* Explicit function naming

* Remove print statements

* No need for semicolons, this is Python

* Update CHANGELOG.md

* fixed logger message

* Improved `exp` value calculation

* rename OIDC_POST_END_SESSION_HOOK to OIDC_AFTER_END_SESSION_HOOK

* added docs for OIDC_AFTER_END_SESSION_HOOK

*  Replaces `LOGIN_URL` with `OIDC_LOGIN_URL`
so users can use a different login path for their oidc requests.

* Adds a setting variable for custom template paths

* Updates documentation

* Fixed bad try/except/finally block

* Adds test for OIDC_TEMPLATES settings

* Determine value for op_browser_state from session_key or default

* Do not use cookie for browser_state. It may not yet be there

* Add docs on new setting

OIDC_UNAUTHENTICATED_SESSION_MANAGEMENT_KEY

* Fix compatibility for older versions of Django

* solved merging typo for missing @property
2017-05-05 05:19:57 +02:00
kaveh
b164388e15 Adds per-client consent customization 2017-04-11 13:16:06 -07:00
Ignacio Fiorentino
5242f0841e Add initial signals logic. 2016-12-01 16:20:34 -03:00
Ignacio Fiorentino
e458542be2 Fix urls and names. 2016-11-01 12:15:48 -03:00
Ignacio Fiorentino
5d07111a18 Implementing end_session_endpoint feature with post_logout_redirect_uri. 2016-10-31 17:07:06 -03:00
Ignacio Fiorentino
50e5287b48 Initial Session Management version. 2016-10-28 15:25:52 -03:00
David Montano
99d7194ab1 Make Client available when using OIDC_EXTRA_SCOPE_CLAIMS
Now it's passed the Token to the ScopeClaims constructor so that it can make Client avaialble to implementors
2016-10-12 14:23:57 -05:00
Ignacio Fiorentino
6ed2c200a7 Update pyjwkest to version 1.3.0. 2016-10-03 12:54:54 -03:00
Ignacio Fiorentino
c14d2f055a Remove Params() object from endpoints classes. 2016-09-09 14:49:41 -03:00
Ignacio Fiorentino
68d982369e Add CORS fix to userinfo view. 2016-09-06 15:37:23 -03:00
Ignacio Fiorentino
a583648be2 Add Access-Control-Allow-Origin to ProviderInfoView. 2016-09-06 13:21:29 -03:00
Graham Ullrich
ba4faee6ef Fix global imports
Global imports ("from X import *") are discouraged in Python.
2016-08-11 16:05:13 -06:00
Graham Ullrich
e04d42fedf flake8 fixes 2016-08-08 11:54:40 -06:00
Ignacio Fiorentino
dc9ec1863e Change setting OIDC_USERINFO. 2016-07-07 12:50:27 -03:00
Ignacio Fiorentino
4cc7474c19 Add verbose name and description for scopes. 2016-06-16 17:18:39 -03:00
Ignacio Fiorentino
70c7d128c1 Refactoring views.py. 2016-06-01 12:09:40 -03:00
Ignacio Fiorentino
eea590e006 Modify scope claims class. 2016-05-30 13:28:07 -03:00
Si Feng
be5656bcf4 Make SITE_URL optional. 2016-05-25 14:58:58 -07:00
Ignacio Fiorentino
a0c7b3c0c4 Create migrations. Improve docs. 2016-04-25 17:33:52 -03:00
Ignacio Fiorentino
9f9df355a3 Merge branch 'v0.3.x' of https://github.com/juanifioren/django-oidc-provider into feature-jwtalg 2016-04-25 14:55:30 -03:00
Ignacio Fiorentino
41dcb192bc Add support for the other values of the prompt param. 2016-04-13 18:38:38 -03:00
Ignacio Fiorentino
61f0c209af Refactoring prompt=none logic. 2016-04-13 17:19:37 -03:00
Ignacio Fiorentino
b05894bf6d Add prompt parameter to authorize view. 2016-04-12 18:19:16 -03:00
Ignacio Fiorentino
3f5992100a Not auto-approve requests for non-confidential clients. 2016-04-08 18:09:24 -03:00
Ignacio
b1b8247cb0 Add hidden inputs for PKCE. Fix bug with AES. 2016-04-07 11:45:35 -03:00
Juan Ignacio Fiorentino
f44b5a1114 Update provider info supporting HS256 id_token sign alg. 2016-03-22 20:48:30 -03:00
juanifioren
fb4e9bd8fe Fix openid scope in authorize view. 2016-02-18 16:03:46 -03:00
juanifioren
3da1ff4c85 Add StandardScopeClaims import. 2016-02-15 17:21:46 -03:00
juanifioren
6488386692 Remove wrong import. 2016-02-15 17:17:43 -03:00
juanifioren
8eb0877d89 Refactoring userinfo endpoint. Create decorator "oauth2.protected_resource_view". 2016-02-15 17:13:19 -03:00
juanifioren
6646bdb92a Add OIDC_SKIP_CONSENT_ALWAYS setting. 2016-02-01 14:34:39 -03:00
juanifioren
998ea5fcd1 Implementation of RSA Keys using Models. Also providing DOC. 2016-01-25 17:52:24 -03:00
juanifioren
41dc9bf4a9 Add "Allow-Origin" header to jwks endpoint. 2016-01-20 17:08:47 -03:00
juanifioren
73ece1bf64 Make OIDC_AFTER_USERLOGIN_HOOK to be lazy imported by string. 2016-01-19 17:37:32 -03:00
juanifioren
8b0d869f7b Replace django redirect with custom HttpResponse object. 2015-11-12 17:12:18 -03:00
Pablo SEMINARIO
6ff48091e5 Fix #49 updating pyjwkest version to 1.0.6
pyjwkest has changed the type of value returned by the `long_to_base64`
function, now it returns unicode.
2015-10-17 23:49:59 +02:00
juanifioren
e178f8c1a9 Add token_endpoint_auth_methods_supported to discovery. 2015-07-31 14:59:33 -03:00
juanifioren
7658257d18 Refactoring in discovery. 2015-07-31 14:19:53 -03:00
juanifioren
cd2b47dac1 Merge branch 'master' of https://github.com/juanifioren/django-oidc-provider 2015-07-27 16:07:21 -03:00
Maarten van Schaik
76efb6fc68 Add logout view to enable minimal session mgmt
This implements a very small part of the OIDC session management as
described in
http://openid.net/specs/openid-connect-session-1_0-17.html#rfc.section.5.

It does not implement the full session management (using iframes) and
does not implement the registration and verification of logout redirect
uri's.
2015-07-24 11:36:45 +02:00
juanifioren
895ca36ab5 Add decode "utf-8" to jwks_uri view. My fault! 2015-07-23 16:17:28 -03:00
juanifioren
d17efb7f0c Add encode "utf-8" to jwks_uri view. 2015-07-23 16:13:26 -03:00
juanifioren
0445f737f2 Fix unicode error python3. 2015-07-23 16:07:55 -03:00
juanifioren
a22fc7c1a1 Add Jwks view to views.py. 2015-07-13 17:34:43 -03:00
juanifioren
197818566d Rename setting. 2015-06-24 12:40:00 -03:00
juanifioren
503324ae66 Add user consent logic to authorize endpoint. 2015-06-22 18:42:42 -03:00