Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed CAS attributes for jasig compatibility #165

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/casserver/views/proxy_validate.builder
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ if @success
xml.tag!("cas:serviceResponse", 'xmlns:cas' => "http://www.yale.edu/tp/cas") do
xml.tag!("cas:authenticationSuccess") do
xml.tag!("cas:user", @username.to_s)
@extra_attributes.each do |key, value|
serialize_extra_attribute(xml, key, value)
if @extra_attributes
xml.tag!("cas:attributes") do
@extra_attributes.each do |key, value|
namespace_aware_key = key[0..3]=='cas:' ? key : 'cas:' + key
serialize_extra_attribute(xml, namespace_aware_key, value)
end
end
end
if @pgtiou
xml.tag!("cas:proxyGrantingTicket", @pgtiou.to_s)
Expand Down
9 changes: 7 additions & 2 deletions lib/casserver/views/service_validate.builder
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ if @success
xml.tag!("cas:serviceResponse", 'xmlns:cas' => "http://www.yale.edu/tp/cas") do
xml.tag!("cas:authenticationSuccess") do
xml.tag!("cas:user", @username.to_s)
@extra_attributes.each do |key, value|
serialize_extra_attribute(xml, key, value)
if @extra_attributes
xml.tag!("cas:attributes") do
@extra_attributes.each do |key, value|
namespace_aware_key = key[0..3]=='cas:' ? key : 'cas:' + key
serialize_extra_attribute(xml, namespace_aware_key, value)
end
end
end
if @pgtiou
xml.tag!("cas:proxyGrantingTicket", @pgtiou.to_s)
Expand Down