Class CASServer::Authenticators::Helpers::Identity
In: lib/casserver/authenticators/active_resource.rb
Parent: ActiveResource::Base

Methods

Public Class methods

Autenticate an identity using the given method @param [Hash] credentials

[Source]

    # 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

[Source]

    # File lib/casserver/authenticators/active_resource.rb, line 32
32:         def self.method_type
33:           @@method_type ||= :post
34:         end

[Source]

    # 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

Public Instance methods

Used to load object attributes from the given response

[Source]

    # File lib/casserver/authenticators/active_resource.rb, line 50
50:         def from_authentication_data response
51:           load_attributes_from_response(response)
52:         end

[Validate]