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

Returns:

  • (String)

See Also:


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.

Returns:

  • (String, nil)

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

Returns:

  • (String, nil)

See Also:


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

Returns:

  • (String, nil)

See Also:


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.

Parameters:

  • service_base_url (String)

    the URL by which CAS knows the service that this proxy will be used for. For aker-protected applications, this will always be the base URL for the whole application — i.e., the URL for the server plus the mount point for the application, if any.

Returns:

  • (String)

    a new ticket

See Also:


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