class OmniAuth::Strategies::CrewCheck
Public Instance Methods
callback_phase()
click to toggle source
Calls superclass method
# File lib/omniauth/strategies/crew_check.rb, line 18 def callback_phase super.tap do |res| if options.role_required && roles.empty? fail!(:invalid_credentials) end end end
Protected Instance Methods
gh_token()
click to toggle source
# File lib/omniauth/strategies/crew_check.rb, line 38 def gh_token credentials['token'] end
roles()
click to toggle source
# File lib/omniauth/strategies/crew_check.rb, line 31 def roles map = options.role_map.kind_of?(Proc) ? options.role_map.call : options.role_map ::CrewCheck::RoleDetermination.new( teams.shorthand_names, map).roles end
teams()
click to toggle source
# File lib/omniauth/strategies/crew_check.rb, line 27 def teams @teams ||= ::CrewCheck::TeamList.fetch(gh_token) end