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

Added User Credentials and Refresh Token Grants #2

Closed
wants to merge 1 commit into from
Closed

Added User Credentials and Refresh Token Grants #2

wants to merge 1 commit into from

Conversation

dhrrgn
Copy link
Contributor

@dhrrgn dhrrgn commented Dec 19, 2012

Added the user_credentials and refresh_token grants. Fixed expires_in so it is inline with the spec, but added expires for the old usage of expires_in. Made redirect_uri in oauth_sessions ALLOW NULL since user_credential grants don't have a redirect.

… so it is inline with the spec, but added expires for the old usage of expires_in. Made redirect_uri in oauth_sessions ALLOW NULL since user_credential grants don't have a redirect
throw new \Oauth2\Authentication\ClientException($this->errors['invalid_credentials'], 0);
}

else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The else could be removed.

@alexbilbie
Copy link
Contributor

FYI I've fixed all the unnecessary if/else blocks that @FrenkyNet commented on in my refactor

@alexbilbie
Copy link
Contributor

So I've cherry-picked some of what you've committed and done a ton of refactoring and now there is a new enableGrantType() method which allows you to enable various different grants which all have native support:

  • authorization_code
  • refresh_token
  • client_credentials (machine2machine auth)
  • password (user's credentials)

Once I've finished this work and added some more unit tests I will add some more code so that adhoc grants can be registered.

@alexbilbie alexbilbie closed this in 94945ec Jan 2, 2013
datapp pushed a commit to datapp/oauth2-server that referenced this pull request Jul 3, 2019
sathishcel pushed a commit to CelestialSystem/oauth2-server-fork that referenced this pull request Apr 20, 2020
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

Successfully merging this pull request may close these issues.

3 participants