次のように、オムニ認証を認証変数に保存しています
auth = request.env["omniauth.auth"]
以下のように調べると
puts auth.inspect
それは私に与えます
#<OmniAuth::AuthHash credentials=#<OmniAuth::AuthHash secret="ouAWj4Hvb9qwKiDDd66ewI8Hq8pDHj8dtfgdlmvdeJDSxY8" token="136631281-Ruduz2BesDwNwcBlwCaV90H358LCA0rCfLonMCE9"> extra=#<OmniAuth::AuthHash access_token=#<OAuth::AccessToken:0x00000003f77968 @token="136631281-Ruduz2BesDwNwcBlwChghaV90H358LCA0rCfLonMCE9", @secret="ouAWj4Hvb9qwKiDDd66ewgdrfgI8Hq8pDHj8lmvdeJDSxY8", @consumer=#<OAuth::Consumer:0x00000003fdf0cb18 @key="UN8w8rgfdDodjpLVgbWFvzCw", @secret="P2MbbeW4LiIyuuSc5gcQ26hcKzQJEyfBgfdyY5g39p2bo0", @options={:signature_method=>"HMAC-SHA1", :request_token_path=>"/oauth/request_token", :authorize_path=>"/oauth/authenticate", :access_token_path=>"/oauth/access_token", :proxy=>nil, :scheme=>:header, :http_method=>:post, :oauth_version=>"1.0", :site=>"https://api.twitter.com"}, @http=#<Net::HTTP api.twitter.com:443 open=false>, @http_method=:post, @uri=#<URI::HTTPS:0x00000003f76cc0 URL:https://api.twitter.com>>, @params={:oauth_token=>"136631281-Ruduz2BesDwNwcgrBlwCaV90H358LCA0rCfLonMCE9", "oauth_token"=>"136631281-Ruduz2BesDwNwcBlgrfwCaV90H358LCA0rCfLonMCE9", :oauth_token_secret=>"ouAWj4Hvb9qwKiDDd66ewI8grHq8pDHj8lmvdeJDSxY8", "oauth_token_secret"=>"ouAWj4Hvb9qwKiDDd66ewI8Hq8pDHj8lmvdeJDSxY8", :user_id=>"136631281", "user_id"=>"136631281", :screen_name=>"sanyagrfks", "screen_name"=>"sangryamrocks"}, @response=#<Net::HTTPClientError 429 Too Many Requests readbody=true>> raw_info=#<OmniAuth::AuthHash errors=[#<OmniAuth::AuthHash code=88 message="Rate limit exceeded">]>> info=#<OmniAuth::AuthHash::InfoHash description=nil image=nil location=nil name=nil nickname=nil urls=#<OmniAuth::AuthHash Twitter="https://twitter.com/" Website=nil>> provider="twitter" uid="136631281">
puts としてプロバイダーの値にアクセスしていることを知っていますauth['provider']
。auth で @params の値を読み取り、 value にアクセスしたいのですが:oauth_token
、どうすれば取得できますか?