i have a variable of type openstruct in my controller. and i want to access the values in this structure in my view.the following is the code snippet.
yield Result[:successful], identity_url, OpenID::SReg::Response.from_success_response(open_id_response)
@user = OpenStruct.new
@user.identity_url = identity_url
@user.nickname = open_id_response[:nickname]
@user.email = open_id_response[:email]
session[:user_id] = @user
redirect_to(:controller=>'user',:action=>'private')
according to me the attributes nickname,email should be accessible in 'private'.. but i keep getting an error
ArgumentError in UserController#login
nickname is not a defined simple registration field
and the following respnse:
Request
Parameters:
{"openid.ax.type.gender"=>"http://axschema.org/person/gender",
"openid.mode"=>"id_res",
"openid.return_to"=>"http://localhost:3000/user/login?open_id_complete=1",
"openid.claimed_id"=>"https://me.yahoo.com/a/g1txs913gePSLaq_S5lJOX9sKXI-#25a64",
"openid.ax.value.gender"=>"F",
"openid.ax.type.language"=>"http://axschema.org/pref/language",
"openid.sig"=>"qPOKg3HTT5Y7trfO8L9A1rnAfCg=",
"openid.ax.type.nickname"=>"http://axschema.org/namePerson/friendly",
"openid.ax.type.timezone"=>"http://axschema.org/pref/timezone",
"openid.ns"=>"http://specs.openid.net/auth/2.0", "
openid.ax.value.nickname"=>"Prad",
"openid.ax.value.language"=>"en-IN",
"openid.op_endpoint"=>"https://open.login.yahooapis.com/openid/op/auth",
"openid.response_nonce"=>"2010-02-02T02:15:01ZcYSmqXcpqIIZDgYws87m9j7qt70CtCqQeQ--",
"openid.ax.type.email"=>"http://axschema.org/contact/email",
"openid.ax.type.fullname"=>"http://axschema.org/namePerson",
"openid.ns.ax"=>"http://openid.net/srv/ax/1.0",
"openid.ax.value.fullname"=>"Pradnya Shah",
"openid.identity"=>"https://me.yahoo.com/a/g1txs913gePSLaq_S5lJOX9sKXI-",
"open_id_complete"=>"1",
"openid.ax.value.timezone"=>"Asia/Shanghai",
"openid.pape.auth_level.nist"=>"0",
"openid.assoc_handle"=>"ZUlkR97hj89gI6bD9pALWZo1YHM4uqS0bXyFs5O5QV_D_v__UNU7bNaX.eZvaG2RsOeSDzkFfIyNF1kWfAzu9OPUocaScG7PJHgRD8d0deEIVYvWgorxKvSxaq_k",
"openid.signed"=>"assoc_handle,
claimed_id,
identity,
mode,
ns,
op_endpoint,
response_nonce,
return_to,
signed,
ax.value.email,
ax.type.email,
ax.value.nickname,
ax.type.nickname,
ax.value.timezone,
ax.type.timezone,
ax.value.gender,
ax.type.gender,
ax.value.language,
ax.type.language,
ax.value.fullname,
ax.type.fullname,
ns.ax,
ax.mode,
pape.auth_level.nist",
"openid.realm"=>"http://localhost:3000",
"openid.ax.mode"=>"fetch_response",
"openid.ax.value.email"=>"[email protected]"}