Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bare bones set of commands and endpoints for admin and testing purposes #42

Open
mewalig opened this issue Jan 12, 2018 · 1 comment
Open

Comments

@mewalig
Copy link

mewalig commented Jan 12, 2018

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:

  1. 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?
  2. 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?
  3. 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!

@arimedvinsky
Copy link

arimedvinsky commented Mar 11, 2018

Install a postgresql client of your choice, connect to the database, and then everything will make sense (just insert test clients, roles, etc ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants