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

Refactor BaseRequest callbacks into configurable lambdas #1032

Merged
merged 2 commits into from
Feb 26, 2018

Conversation

f3ndot
Copy link
Contributor

@f3ndot f3ndot commented Feb 11, 2018

Refactors #1001 into configurable lambdas per @nbulaj's recommendation

Happy to change the name of the config options and description, if you have a better idea.


def after_successful_response; end
def after_successful_response
Doorkeeper.configuration.after_successful_strategy_response.call(self, @response)

Choose a reason for hiding this comment

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

Line is too long. [89/80]

@@ -228,7 +228,8 @@ def option(name, options = {})
warn(I18n.translate('doorkeeper.errors.messages.credential_flow_not_configured'))
nil
end)

option :before_successful_strategy_response, default: ->(_request) {}
option :after_successful_strategy_response, default: ->(_request, _response) {}

Choose a reason for hiding this comment

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

Line is too long. [84/80]

@f3ndot f3ndot changed the title Refactor BaseRquest callbacks into configurable lambdas Refactor BaseRequest callbacks into configurable lambdas Feb 11, 2018
@nbulaj nbulaj self-assigned this Feb 12, 2018
@nbulaj nbulaj added this to the 5.0 milestone Feb 13, 2018
@nbulaj nbulaj merged commit f03fec4 into doorkeeper-gem:master Feb 26, 2018
@nbulaj
Copy link
Member

nbulaj commented Feb 26, 2018

Thank you @f3ndot for your work!

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

Successfully merging this pull request may close these issues.

3 participants