Class: Bizside::ShibUtils

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

Overview

Shibboleth環境に関するユーティリティ

Constant Summary collapse

LOGOUT_URL =
'/Shibboleth.sso/Logout'

Class Method Summary collapse

Class Method Details

._get_bizside_user(hash) ⇒ Object



11
12
13
14
15
16
# File 'lib/bizside/shib_utils.rb', line 11

def self._get_bizside_user(hash)
  ret = hash['mail']
  ret ||= hash['HTTP_X_BIZSIDE_USER']
  ret ||= hash['X-BIZSIDE-USER']
  ret
end

.get_bizside_user(request) ⇒ Object



5
6
7
8
9
# File 'lib/bizside/shib_utils.rb', line 5

def self.get_bizside_user(request)
  ret = _get_bizside_user(request.env)
  ret ||= _get_bizside_user(request.headers)
  ret
end