Class: CASServer::Controllers::ProxyValidate

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

Overview

2.6

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.6.1



337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/casserver/controllers.rb', line 337

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']
  
  @proxies = []
  
  t, @error = validate_proxy_ticket(@service, @ticket)      
  @success = t && !@error
  
  @extra_attributes = {}
  if @success
    @username = t.username
    
    if t.kind_of? CASServer::Models::ProxyTicket
      @proxies << t.granted_by_pgt.service_ticket.service
    end
      
    if @pgt_url
      pgt = generate_proxy_granting_ticket(@pgt_url, t)
      @pgtiou = pgt.iou if pgt
    end
    
    @extra_attributes = t.granted_by_tgt.extra_attributes || {}
  end
  
  @status = CASServer::Controllers.response_status_from_error(@error) if @error

 render :proxy_validate
end