Newer
Older
dmpopidor / public / html / Users / OmniauthShibbolethRequestController.html
<!DOCTYPE html>

<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">

<title>class Users::OmniauthShibbolethRequestController - DMPonline4 Documentation</title>

<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
</script>

<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>


<body id="top" class="class">
<nav id="metadata">
  <nav id="home-section" class="section">
  <h3 class="section-header">
    <a href="../index.html">Home</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </h3>
</nav>


  <nav id="search-section" class="section project-section" class="initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <h3 class="section-header">
      <input type="text" name="search" placeholder="Search" id="search-field"
             title="Type to search, Up and Down to navigate, Enter to load">
    </h3>
  </form>

  <ul id="search-results" class="initially-hidden"></ul>
</nav>


  <div id="file-metadata">
    <nav id="file-list-section" class="section">
  <h3 class="section-header">Defined In</h3>
  <ul>
    <li>app/controllers/users/omniauth_shibboleth_request_controller.rb
  </ul>
</nav>

    
  </div>

  <div id="class-metadata">
    
    <nav id="parent-class-section" class="section">
  <h3 class="section-header">Parent</h3>
  
  <p class="link"><a href="../ApplicationController.html">ApplicationController</a>
  
</nav>

    
    <!-- Method Quickref -->
<nav id="method-list-section" class="section">
  <h3 class="section-header">Methods</h3>

  <ul class="link-list">
    
    <li><a href="#method-i-associate">#associate</a>
    
    <li><a href="#method-i-redirect">#redirect</a>
    
  </ul>
</nav>

  </div>

  <div id="project-metadata">
    <nav id="fileindex-section" class="section project-section">
  <h3 class="section-header">Pages</h3>

  <ul>
  
    <li class="file"><a href="../README_rdoc.html">README</a>
  
  </ul>
</nav>

    <nav id="classindex-section" class="section project-section">
  <h3 class="section-header">Class and Module Index</h3>

  <ul class="link-list">
  
    <li><a href="../Settings.html">Settings</a>
  
    <li><a href="../Settings/Dmptemplate.html">Settings::Dmptemplate</a>
  
    <li><a href="../Settings/PlanList.html">Settings::PlanList</a>
  
    <li><a href="../Settings/PlansController.html">Settings::PlansController</a>
  
    <li><a href="../Settings/ProjectsController.html">Settings::ProjectsController</a>
  
    <li><a href="../Settings/SettingsController.html">Settings::SettingsController</a>
  
    <li><a href="../ActiveAdmin.html">ActiveAdmin</a>
  
    <li><a href="../ActiveAdmin/Views.html">ActiveAdmin::Views</a>
  
    <li><a href="../ActiveAdmin/Views/Pages.html">ActiveAdmin::Views::Pages</a>
  
    <li><a href="../ActiveAdmin/Views/Pages/Base.html">ActiveAdmin::Views::Pages::Base</a>
  
    <li><a href="../Users.html">Users</a>
  
    <li><a href="../Users/OmniauthCallbacksController.html">Users::OmniauthCallbacksController</a>
  
    <li><a href="../Users/OmniauthShibbolethRequestController.html">Users::OmniauthShibbolethRequestController</a>
  
    <li><a href="../DMPonline4.html">DMPonline4</a>
  
    <li><a href="../DMPonline4/Application.html">DMPonline4::Application</a>
  
    <li><a href="../Ability.html">Ability</a>
  
    <li><a href="../Answer.html">Answer</a>
  
    <li><a href="../AnswersController.html">AnswersController</a>
  
    <li><a href="../ApplicationController.html">ApplicationController</a>
  
    <li><a href="../ApplicationHelper.html">ApplicationHelper</a>
  
    <li><a href="../Comment.html">Comment</a>
  
    <li><a href="../CommentsController.html">CommentsController</a>
  
    <li><a href="../ConfirmationsController.html">ConfirmationsController</a>
  
    <li><a href="../ContactsController.html">ContactsController</a>
  
    <li><a href="../CustomFailure.html">CustomFailure</a>
  
    <li><a href="../Dmptemplate.html">Dmptemplate</a>
  
    <li><a href="../DmptemplatesController.html">DmptemplatesController</a>
  
    <li><a href="../ExistingUsersController.html">ExistingUsersController</a>
  
    <li><a href="../ExportedPlan.html">ExportedPlan</a>
  
    <li><a href="../FileType.html">FileType</a>
  
    <li><a href="../FileUpload.html">FileUpload</a>
  
    <li><a href="../Guidance.html">Guidance</a>
  
    <li><a href="../GuidanceGroup.html">GuidanceGroup</a>
  
    <li><a href="../GuidanceGroupsController.html">GuidanceGroupsController</a>
  
    <li><a href="../GuidancesController.html">GuidancesController</a>
  
    <li><a href="../HomeController.html">HomeController</a>
  
    <li><a href="../Object.html">Object</a>
  
    <li><a href="../Option.html">Option</a>
  
    <li><a href="../OptionWarning.html">OptionWarning</a>
  
    <li><a href="../Org.html">Organisation</a>
  
    <li><a href="../OrganisationType.html">OrganisationType</a>
  
    <li><a href="../OrganisationUsersController.html">OrganisationUsersController</a>
  
    <li><a href="../OrganisationsController.html">OrganisationsController</a>
  
    <li><a href="../PasswordsController.html">PasswordsController</a>
  
    <li><a href="../Phase.html">Phase</a>
  
    <li><a href="../Plan.html">Plan</a>
  
    <li><a href="../PlanSection.html">PlanSection</a>
  
    <li><a href="../PlansController.html">PlansController</a>
  
    <li><a href="../PlansHelper.html">PlansHelper</a>
  
    <li><a href="../Project.html">Project</a>
  
    <li><a href="../ProjectGroup.html">ProjectGroup</a>
  
    <li><a href="../ProjectGroupsController.html">ProjectGroupsController</a>
  
    <li><a href="../ProjectPartner.html">ProjectPartner</a>
  
    <li><a href="../ProjectsController.html">ProjectsController</a>
  
    <li><a href="../Question.html">Question</a>
  
    <li><a href="../QuestionFormat.html">QuestionFormat</a>
  
    <li><a href="../RegistrationsController.html">RegistrationsController</a>
  
    <li><a href="../Role.html">Role</a>
  
    <li><a href="../Section.html">Section</a>
  
    <li><a href="../SessionsController.html">SessionsController</a>
  
    <li><a href="../SplashLog.html">SplashLog</a>
  
    <li><a href="../SplashLogsController.html">SplashLogsController</a>
  
    <li><a href="../StaticPagesController.html">StaticPagesController</a>
  
    <li><a href="../SuggestedAnswer.html">SuggestedAnswer</a>
  
    <li><a href="../Theme.html">Theme</a>
  
    <li><a href="../ThemesController.html">ThemesController</a>
  
    <li><a href="../User.html">User</a>
  
    <li><a href="../UserMailer.html">UserMailer</a>
  
    <li><a href="../UserOrgRole.html">UserOrgRole</a>
  
    <li><a href="../UserOrgRolesController.html">UserOrgRolesController</a>
  
    <li><a href="../UserRoleType.html">UserRoleType</a>
  
    <li><a href="../UserRoleTypesController.html">UserRoleTypesController</a>
  
    <li><a href="../UserStatus.html">UserStatus</a>
  
    <li><a href="../UserStatusesController.html">UserStatusesController</a>
  
    <li><a href="../UserType.html">UserType</a>
  
    <li><a href="../UserTypesController.html">UserTypesController</a>
  
    <li><a href="../UsersController.html">UsersController</a>
  
    <li><a href="../Version.html">Version</a>
  
  </ul>
</nav>

  </div>
</nav>

<div id="documentation">
  <h1 class="class">class Users::OmniauthShibbolethRequestController</h1>

  <div id="description" class="description">
    
  </div><!-- description -->

  
  
  
  <section id="5Buntitled-5D" class="documentation-section">
    

    

    

    

    <!-- Methods -->
    
     <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-associate" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">associate</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          
          

          
          <div class="method-source-code" id="associate-source">
            <pre><span class="ruby-comment"># File app/controllers/users/omniauth_shibboleth_request_controller.rb, line 17</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">associate</span>
  <span class="ruby-comment"># This action is protected - can only be reached if user is already logged in.
</span>
  <span class="ruby-comment"># See before_filter
</span>
  <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">user_omniauth_callback_path</span>(<span class="ruby-value">:shibboleth</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- associate-source -->
          
        </div>

        

        
      </div><!-- associate-method -->

    
      <div id="method-i-redirect" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">redirect</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          
          

          
          <div class="method-source-code" id="redirect-source">
            <pre><span class="ruby-comment"># File app/controllers/users/omniauth_shibboleth_request_controller.rb, line 4</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">redirect</span>
      <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">organisation</span>.<span class="ruby-identifier">nil?</span>
      <span class="ruby-identifier">idp</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:idp</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">organisation</span>.<span class="ruby-identifier">wayfless_entity</span>
  <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">idp</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:idp</span>]
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">query_params</span> = {<span class="ruby-identifier">target</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user_omniauth_callback_path</span>(<span class="ruby-value">:shibboleth</span>)}
  <span class="ruby-keyword">unless</span> <span class="ruby-identifier">idp</span>.<span class="ruby-identifier">blank?</span>
    <span class="ruby-identifier">query_params</span>[<span class="ruby-value">:entityID</span>] = <span class="ruby-identifier">idp</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">redirect_to</span> <span class="ruby-node">&quot;#{Rails.application.config.shibboleth_login}?#{query_params.to_query}&quot;</span>, <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-value">302</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- redirect-source -->
          
        </div>

        

        
      </div><!-- redirect-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- 5Buntitled-5D -->

</div><!-- documentation -->


<footer id="validator-badges">
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
  <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
</footer>