def authorize_url(opts = {})
      opts[:redirect_uri] ||= DEFAULT_REDIRECT_URI
      # scope：非必须参数，以空格分隔的权限列表，若不传递此参数，代表请求用户的默认权限。关于权限的具体信息请参考“权限列表”。
      opts[:scope] ||= "basic netdisk super_msg"
      oauth_client.auth_code.authorize_url(scope: opts[:scope], redirect_uri: opts[:redirect_uri])
    end
def authorize_url(opts = {})
      opts[:redirect_uri] ||= DEFAULT_REDIRECT_URI
      # scope：非必须参数，以空格分隔的权限列表，若不传递此参数，代表请求用户的默认权限。关于权限的具体信息请参考“权限列表”。
      opts[:scope] ||= "basic netdisk super_msg"
      oauth_client.auth_code.authorize_url(scope: opts[:scope], redirect_uri: opts[:redirect_uri])
    end
=begin rdoc
OAuth2 +authorize_url+

redirect or open this URL for login in Baidu website

=== Params:

* +opts+ Hash
  * +redirect_uri+ String - default Baidu::DEFAULT_REDIRECT_URI,URL with logined redirect back

=== Rails example:

  class SessionController
    def oauth
      redirect_to $baidu.authorize_url(redirect_uri: callback_session_url)
    end

    def callback
      auth_code = params[:code]
      $baidu.token!(auth_code)
    end
  end
=end