Comments (5)
Hi @wiliamsouza
do you think we should use oauthlib functions as a default implementation? is that really necessary?
I mean, the generate_client_id function in oauthlib is more compliant because it uses all the chars defined in the RFC, ok, but at the same time specification leaves you free to decide how the client_secret and the client_id should be generated (google for example use the following as client_id 1084945748469-eg34imk572gdhu83gj5p0an9fut6urp5.apps.googleusercontent.com).
I expect that developers want to use their own generation function and this can be achieved extending BaseHashGenerator
and adding your class to settings:
OAUTH2_PROVIDER = {
'CLIENT_ID_GENERATOR_CLASS':
'foo.bar.YourClientIdGenerator',
'CLIENT_SECRET_GENERATOR_CLASS':
'foo.bar.YourClientSecretGenerator',
}
In the end, I don't think your proposal is a bad idea but I'd like to think about it for a moment.
If you want to continue the conversation I'll be glad.
Thnx a lot
from django-oauth-toolkit.
I'm in favor to provide the default as especifield by the rfc and let the user choose what to use. I don't see any problem in the way it work today the issue is more informative that oauthlib provides functions to generate client id and secret.
from django-oauth-toolkit.
I thought about it and I think it's a good to use oauthlib generation function as the default implementation... it's really better! Anyway we need to add some limitations to client_id generated strings: see issues #24 and #25 for more details.
from django-oauth-toolkit.
I agree to use oauthlib generation functions as default implementation. However we need to solve quoted issues (I'm on it).
from django-oauth-toolkit.
I merged the PR, think we can close
from django-oauth-toolkit.
Related Issues (20)
- ModuleNotFoundError: No module named 'oauth2_providerapi' HOT 1
- Support for optional Authorization Server Metadata HOT 1
- Remove 255 Character Limit on Tokens to Support JWT with Additional Claims HOT 7
- Custom validator not being called HOT 1
- Generate token after autorization HOT 1
- Add `localhost` to Allowed Loopback Addresses for Redirect URIs HOT 1
- Suitability for LTI 1.3 HOT 1
- Introspect returns 200 when access token does not exist HOT 3
- Django axes with msal integration
- Missing Import in Documentation HOT 3
- app without client_secret (still) not working? HOT 3
- ValueError in jwks.json HOT 1
- Help on application-specific scopes implementation HOT 2
- Is m2r actually still needed ?
- Ideas on where to store client id and secret when Application is created on server startup
- How Consent Form is Working? HOT 4
- OAuth Toolkit Requiring Authorization HOT 1
- ValueError from oauthlib when validating query strings is raised as 500 instead of 400 HTTP error (in DRF extension)
- Introspection endpoint doesn't require "introspection" scope when used in client-credentials flow HOT 3
- fix test.mig_settings for OIDC migrations and swappable dependencies?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-oauth-toolkit.