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

Enable fosite composing with custom hashers. #170

Merged
merged 1 commit into from
Jun 3, 2017

Conversation

matthewhartstonge
Copy link
Contributor

Makes it a little easier for composing, plus follows the same conventions as storage. Seeks to keep compatibility by setting BCrypt as the default hasher if one isn't set.

Signed-off-by: Matthew Hartstonge [email protected]

@coveralls
Copy link

coveralls commented May 22, 2017

Coverage Status

Coverage remained the same at 71.945% when pulling 46b7d13 on MatthewHartstonge:submit-custom-hasher-support into d5fafb8 on ory:master.

@coveralls
Copy link

coveralls commented May 22, 2017

Coverage Status

Coverage remained the same at 71.945% when pulling a459f37 on MatthewHartstonge:submit-custom-hasher-support into d5fafb8 on ory:master.

@@ -30,14 +30,17 @@ type Factory func(config *Config, storage interface{}, strategy interface{}) int
// )
//
// Compose makes use of interface{} types in order to be able to handle a all types of stores, strategies and handlers.
func Compose(config *Config, storage interface{}, strategy interface{}, factories ...Factory) fosite.OAuth2Provider {
func Compose(config *Config, storage interface{}, strategy interface{}, hasher interface{}, factories ...Factory) fosite.OAuth2Provider {
Copy link
Member

Choose a reason for hiding this comment

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

Why is hasher an interface here? It's not being used apart from type asserting hasher.(fosite.Hasher)

Copy link
Contributor Author

@matthewhartstonge matthewhartstonge May 23, 2017

Choose a reason for hiding this comment

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

Good question! I was blindly copying the storage implementation. Fixed with latest commit.

@aeneasr aeneasr added the stale Feedback from one or more authors is required to proceed. label May 23, 2017
@coveralls
Copy link

Coverage Status

Coverage remained the same at 71.945% when pulling f479865 on MatthewHartstonge:submit-custom-hasher-support into d5fafb8 on ory:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 71.945% when pulling f479865 on MatthewHartstonge:submit-custom-hasher-support into d5fafb8 on ory:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 71.945% when pulling eccc205 on MatthewHartstonge:submit-custom-hasher-support into fe74027 on ory:master.

@aeneasr aeneasr removed the stale Feedback from one or more authors is required to proceed. label May 31, 2017
@aeneasr
Copy link
Member

aeneasr commented May 31, 2017

note to self: add this to breaking changes in history.md

@aeneasr aeneasr merged commit d70d882 into ory:master Jun 3, 2017
budougumi0617 added a commit to budougumi0617/fosite that referenced this pull request May 10, 2019
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