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

#340 Restrict access to controllers methods #341

Conversation

gkopylov
Copy link
Contributor

DeviseTokenAuth::OmniauthCallbacksController#omniauth_params is still need to be restricted but we need to create appropriate tests for this.

@nbrustein
Copy link
Contributor

@gkopylov is there a reason you did not also make omniauth_params a protected method? (in omniauth_callbacks_controller)

@gkopylov
Copy link
Contributor Author

@nbrustein because it will raise an error for this test for example https://github.com/lynndylanhurley/devise_token_auth/blob/master/test/controllers/devise_token_auth/omniauth_callbacks_controller_test.rb#L75

So, becase of this I have written:

but we need to create appropriate tests for this

@nbrustein
Copy link
Contributor

I see. How would you feel about using controller.send(:omniauth_params) in the test. Doesn't seem to crazy to me.

@gkopylov
Copy link
Contributor Author

It is a bit hackish but I think it is fair enough too.

Anyway I think it is better to handle token authorization by yourself(at least at the current moment) :-)

@booleanbetrayal
Copy link
Collaborator

This all looks good to me! 👍

booleanbetrayal added a commit that referenced this pull request Aug 31, 2015
…ers_methods

#340 Restrict access to controllers methods
@booleanbetrayal booleanbetrayal merged commit 0348ad2 into lynndylanhurley:master Aug 31, 2015
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.

None yet

3 participants