|
| 1 | +======== |
| 2 | +Settings |
| 3 | +======== |
| 4 | + |
| 5 | +This document describes the Django settings that can be used to customize the configuration |
| 6 | +of ``mozilla-django-oidc``. |
| 7 | + |
| 8 | +.. attribute:: SITE_URL |
| 9 | + |
| 10 | + :default: No default |
| 11 | + |
| 12 | + URL that users access your site from. Make sure that you provide the protocol, domain, |
| 13 | + path and port if needed (e.g. ``<protocol>://<domain>:<port>/<path>``) |
| 14 | + |
| 15 | + .. note:: |
| 16 | + This does not have to be a publicly accessible URL, so local URLs |
| 17 | + like ``http://localhost:8000`` or ``http://127.0.0.1`` are acceptable as |
| 18 | + long as they match what you are using to access your site. |
| 19 | + |
| 20 | + |
| 21 | +.. attribute:: OIDC_OP_AUTHORIZATION_ENDPOINT |
| 22 | + |
| 23 | + :default: No default |
| 24 | + |
| 25 | + URL of your OpenID Connect provider authorization endpoint. |
| 26 | + |
| 27 | +.. attribute:: OIDC_OP_TOKEN_ENDPOINT |
| 28 | + |
| 29 | + :default: No default |
| 30 | + |
| 31 | + URL of your OpenID Connect provider token endpoint |
| 32 | + |
| 33 | +.. attribute:: OIDC_OP_USER_ENDPOINT |
| 34 | + |
| 35 | + :default: No default |
| 36 | + |
| 37 | + URL of your OpenID Connect provider userinfo endpoint |
| 38 | + |
| 39 | +.. attribute:: OIDC_RP_CLIENT_ID |
| 40 | + |
| 41 | + :default: No default |
| 42 | + |
| 43 | + OpenID Connect client ID provided by your OP |
| 44 | + |
| 45 | +.. attribute:: OIDC_RP_CLIENT_SECRET |
| 46 | + |
| 47 | + :default: No default |
| 48 | + |
| 49 | + OpenID Connect client secret provided by your OP |
| 50 | + |
| 51 | +.. attribute:: OIDC_RP_CLIENT_SECRET_ENCODED |
| 52 | + |
| 53 | + :default: ``False`` |
| 54 | + |
| 55 | + Controls whether your client secret requires base64 decoding for verification |
| 56 | + |
| 57 | +.. attribute:: OIDC_VERIFY_JWT |
| 58 | + |
| 59 | + :default: ``True`` |
| 60 | + |
| 61 | + Controls whether the OpenID Connect client verifies the signature of the JWT tokens |
| 62 | + |
| 63 | +.. attribute:: OIDC_USE_NONCE |
| 64 | + |
| 65 | + :default: ``True`` |
| 66 | + |
| 67 | + Controls whether the OpenID Connect client uses nonce verification |
| 68 | + |
| 69 | +.. attribute:: OIDC_VERIFY_SSL |
| 70 | + |
| 71 | + :default: ``True`` |
| 72 | + |
| 73 | + Controls whether the OpenID Connect client verifies the SSL certificate of the OP responses |
| 74 | + |
| 75 | +.. attribute:: OIDC_CREATE_USER |
| 76 | + |
| 77 | + :default: ``True`` |
| 78 | + |
| 79 | + Enables or disables automatic user creation during authentication |
| 80 | + |
| 81 | +.. attribute:: OIDC_STATE_SIZE |
| 82 | + |
| 83 | + :default: ``32`` |
| 84 | + |
| 85 | + Sets the length of the random string used for OpenID Connect state verification |
| 86 | + |
| 87 | +.. attribute:: OIDC_NONCE_SIZE |
| 88 | + |
| 89 | + :default: ``32`` |
| 90 | + |
| 91 | + Sets the length of the random string used for OpenID Connect nonce verification |
| 92 | + |
| 93 | +.. attribute:: OIDC_REDIRECT_FIELD_NAME |
| 94 | + |
| 95 | + :default: ``next`` |
| 96 | + |
| 97 | + Sets the GET parameter that is being used to define the redirect URL after succesful authentication |
| 98 | + |
| 99 | +.. attribute:: OIDC_CALLBACK_CLASS |
| 100 | + |
| 101 | + :default: ``mozilla_django_oidc.views.OIDCAuthenticationCallbackView`` |
| 102 | + |
| 103 | + Allows you to substitute a custom class-based view to be used as OpenID Connect |
| 104 | + callback URL. |
| 105 | + |
| 106 | + .. note:: |
| 107 | + |
| 108 | + When using a custom callback view, it is generally a good idea to subclass the |
| 109 | + default ``OIDCAuthenticationCallbackView`` and override the methods you want to change. |
| 110 | + |
| 111 | +.. attribute:: LOGIN_REDIRECT_URL |
| 112 | + |
| 113 | + :default: ``/accounts/profile`` |
| 114 | + |
| 115 | + Path to redirect to on successful login. If you don't specify this, the |
| 116 | + default Django value will be used. |
| 117 | + |
| 118 | +.. attribute:: LOGIN_REDIRECT_URL_FAILURE |
| 119 | + |
| 120 | + :default: ``/`` |
| 121 | + |
| 122 | + Path to redirect to on an unsuccessful login attempt. |
| 123 | + |
| 124 | + |
| 125 | +.. attribute:: LOGOUT_REDIRECT_URL |
| 126 | + |
| 127 | + :default: ``/`` |
| 128 | + |
| 129 | + Path to redirect to on logout. |
0 commit comments