| Class | CASServer::Authenticators::Helpers::Identity |
| In: |
lib/casserver/authenticators/active_resource.rb
|
| Parent: | ActiveResource::Base |
Autenticate an identity using the given method @param [Hash] credentials
# File lib/casserver/authenticators/active_resource.rb, line 44
44: def self.authenticate(credentials = {})
45: response = send(method_type, method_name, credentials)
46: new.from_authentication_data(response)
47: end
# File lib/casserver/authenticators/active_resource.rb, line 32
32: def self.method_type
33: @@method_type ||= :post
34: end
# File lib/casserver/authenticators/active_resource.rb, line 36
36: def self.method_type= type
37: methods = [:get, :post, :put, :delete]
38: raise ArgumentError, "Method type should be one of #{methods.map { |m| m.to_s.upcase }.join(', ')}" unless methods.include? type.to_sym
39: @@method_type = type
40: end