forked from oauth-xx/oauth2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix redirect uri format in Client#request
- Loading branch information
1 parent
fb502c7
commit bf38948
Showing
1 changed file
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think this is slightly clearn for LOC 92-98
I'm also wondering if you really need to re-write
opts[:body][:redirect_uri]
and can rather leave the original value alone and do something like:body = opts[:body] ? URI.encode_www_form(opts[:body][:redirect_uri].split("?").first) : opts
I would also suggest naming what you're doing with
opts[:body][:redirect_uri].split("?").first
it's some sort of sanitation and a private method seems like a good home so that you get something like:body = opts[:body] ? URI.encode_www_form(sanitize_querystring_on_body_rediect_uri) : opts