Class: Pasaporte::Controllers::Decide

Inherits:
Object
  • Object
show all
Defined in:
lib/pasaporte.rb

Overview

Figure out if we want to pass info to a site or not. This gets called when associating for the first time

Instance Method Summary collapse

Instance Method Details

#get_with_nickObject



569
570
571
572
573
574
575
# File 'lib/pasaporte.rb', line 569

def get_with_nick
  require_ssl!
  require_login!
  
  @oid_request = @state.pending_openid
  render :decide
end

#post_with_nickObject



577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/pasaporte.rb', line 577

def post_with_nick
  require_ssl!
  require_login!
  if !@state.pending_openid
    @report = "There is no OpenID request to approve anymore. Looks like it went out already."
    render :bailout
  elsif input.nope
    @oid_request = @state.delete(:pending_openid)
    send_openid_response @oid_request.answer(false); return
  else
    @profile.approvals.create(:trust_root => @state.pending_openid.trust_root)
    redirect R(Openid, @nickname); return
  end
end