Class: CASServer::Controllers::ServiceValidate

Inherits:
R
  • Object
show all
Includes:
CASServer::CAS
Defined in:
lib/casserver/controllers.rb

Overview

2.5

Instance Method Summary collapse

Methods included from CASServer::CAS

clean_service_url, #generate_login_ticket, #generate_proxy_granting_ticket, #generate_proxy_ticket, #generate_service_ticket, #generate_ticket_granting_ticket, #send_logout_notification_for_service_ticket, #service_uri_with_ticket, #validate_login_ticket, #validate_proxy_granting_ticket, #validate_proxy_ticket, #validate_service_ticket, #validate_ticket_granting_ticket

Instance Method Details

#getObject

2.5.1



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/casserver/controllers.rb', line 310

def get
  CASServer::Utils::log_controller_action(self.class, input)

  # required
  @service = clean_service_url(input['service'])
  @ticket = input['ticket']
  # optional
  @pgt_url = input['pgtUrl']
  @renew = input['renew']

  st, @error = validate_service_ticket(@service, @ticket)
  @success = st && !@error

  if @success
    @username = st.username
    if @pgt_url
      pgt = generate_proxy_granting_ticket(@pgt_url, st)
      @pgtiou = pgt.iou if pgt
    end
    @extra_attributes = st.granted_by_tgt.extra_attributes || {}
  end

  @status = CASServer::Controllers.response_status_from_error(@error) if @error

  render :service_validate
end