Class: CasrackTheAuthenticator::Configuration
- Inherits:
-
Object
- Object
- CasrackTheAuthenticator::Configuration
- Defined in:
- lib/casrack_the_authenticator/configuration.rb
Constant Summary collapse
- DEFAULT_LOGIN_URL =
"%s/login"
- DEFAULT_SERVICE_VALIDATE_URL =
"%s/serviceValidate"
Instance Method Summary collapse
-
#initialize(params) ⇒ Configuration
constructor
A new instance of Configuration.
-
#login_url(service) ⇒ String
Build a CAS login URL from
service
. -
#service_validate_url(service, ticket) ⇒ String
Build a service-validation URL from
service
andticket
.
Constructor Details
#initialize(params) ⇒ Configuration
Returns a new instance of Configuration.
22 23 24 |
# File 'lib/casrack_the_authenticator/configuration.rb', line 22 def initialize(params) parse_params params end |
Instance Method Details
#login_url(service) ⇒ String
Build a CAS login URL from service
.
32 33 34 |
# File 'lib/casrack_the_authenticator/configuration.rb', line 32 def login_url(service) append_service @login_url, service end |
#service_validate_url(service, ticket) ⇒ String
Build a service-validation URL from service
and ticket
.
43 44 45 46 |
# File 'lib/casrack_the_authenticator/configuration.rb', line 43 def service_validate_url(service, ticket) url = append_service @service_validate_url, service url << '&ticket=' << Rack::Utils.escape(ticket) end |