protected
def oauth1_authorize
+ append_content_security_policy_directives(:form_action => %w[*])
+
if @token.invalidated?
@message = t "oauth.oauthorize_failure.invalid"
render :action => "authorize_failure"
else
@token.oob? ? @token.client_application.callback_url : @token.callback_url
end
- @redirect_url = URI.parse(callback_url) unless callback_url.blank?
+ @redirect_url = URI.parse(callback_url) if callback_url.present?
if @redirect_url.to_s.blank?
render :action => "authorize_success"
"&oauth_token=#{@token.token}"
end
- unless @token.oauth10?
- @redirect_url.query += "&oauth_verifier=#{@token.verifier}"
- end
+ @redirect_url.query += "&oauth_verifier=#{@token.verifier}" unless @token.oauth10?
redirect_to @redirect_url.to_s
end