Module: Aker::Cas::UserExt

Includes:
Castanet::Client
Defined in:
lib/aker/cas/user_ext.rb

Overview

Extensions for User instances that come from CAS credentials.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cas_urlString

The base URL of the CAS server.

This is typically set by Authority#valid_credentials?.


19
20
21
# File 'lib/aker/cas/user_ext.rb', line 19

def cas_url
  @cas_url
end

#pgtString?

The proxy granting ticket associated with the User, or nil if no PGT exists.


44
45
46
# File 'lib/aker/cas/user_ext.rb', line 44

def pgt
  @pgt
end

#proxy_callback_urlString?

The proxy callback URL used by the CAS server.

This is typically set by Authority#valid_credentials?.


28
29
30
# File 'lib/aker/cas/user_ext.rb', line 28

def proxy_callback_url
  @proxy_callback_url
end

#proxy_retrieval_urlString?

The proxy retrieval URL from which Aker will retrieve PGTs.

This is typically set by Authority#valid_credentials?.


37
38
39
# File 'lib/aker/cas/user_ext.rb', line 37

def proxy_retrieval_url
  @proxy_retrieval_url
end

Instance Method Details

#cas_proxy_ticket(service_base_url) ⇒ String

Returns a proxy ticket so that an application may authenticate to another CAS-using service on behalf of this user. Each invocation will request and return a fresh ticket.


60
61
62
# File 'lib/aker/cas/user_ext.rb', line 60

def cas_proxy_ticket(service_base_url)
  issue_proxy_ticket(pgt, service_base_url).ticket
end