go-oauth2-server
go-oauth2-server copied to clipboard
bare bones set of commands and endpoints for admin and testing purposes
Thanks for putting this great project together. I've built the go-oauth2-server and it seems to run fine but I'm having trouble figuring out how to actually use it. Apologies in advance if these questions are covered in documentation somewhere that I missed, but how can I do the following basic tasks for testing purposes? If it's just a series of generic SQL INSERT statements, that's fine:
- add users (providing the userid and password). How do I do this? Do I have to create both a role, as well as a user, to populate the oauth_roles and oauth_users tables? Are there predefined roles? Can I populate the related database tables directly with a SQL statement or should that be done through a command or endpoint request?
- Will I need to add a scope and associate that scope with something in the response data (are there predefined scopes?) in order to make a successful client authentication call?
- How do I register an application (by providing a redirect_uri) and receive back (and/or provide) the related client_id and client_secret?
Past the above 3 server-side steps, it would be ideal to have a sample client test script (in any language), such as the sample python client script for Google OAuth. To do this, I think the only additional info needed would be the endpoints for: authorization_base_url e.g. "https://localhost:8080/o/oauth2/v2/auth" token_url e.g. "https://localhost:8080/oauth2/v4/token" refresh_url e.g. "https://localhost:8080/oauth2/v4/token" scope(s): e.g. "https://localhost:8080/auth/userinfo.email"
Any suggestions or guidance would be much appreciated!