app/controllers/bluebutton/demo_controller.rb
# Handler for Bluebutton authorization redirect/callback
Handler for Bluebutton authorization redirect/callback
Handler for Bluebutton authorization redirect / callback
def callback
    @bluebutton_oauth_service = BluebuttonOauthService.new(session[:bb_acc_token],session[:bb_state])
    @bluebutton_oauth_service.set_access_token(params[:code])
    @bluebutton_oauth_service.refresh_access_token
    redirect_to bluebutton_main_path, :notice => "you have been successfully authorized!"
    session[:bb_acc_token] = @bluebutton_oauth_service.bb_acc_token
  end
def callback @bluebutton_oauth_service = BluebuttonOauthService . new ( session [ :bb_acc_token ] , session [ :bb_state ] ) @bluebutton_oauth_service . set_access_token ( params [ :code ] ) @bluebutton_oauth_service . refresh_access_token redirect_to bluebutton_main_path , :notice => "you have been successfully authorized!" session [ :bb_acc_token ] = @bluebutton_oauth_service . bb_acc_token end
Handler for Bluebutton authorization redirect/callback
Handler for Bluebutton authorization redirect / callback
# Save access token to session.  