jsumners / hapi-cas

A Hapi framework plugin to provide authentication via servers implementing Apereo's CAS protocol
5 stars 3 forks source link

Save CAS return for client processing #3

Closed mpmeyer closed 8 years ago

mpmeyer commented 8 years ago

Since some CAS servers provide extra attributes in an unsupported manner, save the CAS result for client processing.

Unsupported extra attribute user_id is provided:

<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas">
<cas:authenticationSuccess>
  <cas:user>myusername</cas:user>
  <user_id>123</user_id>
</cas:authenticationSuccess>
</cas:serviceResponse>

Save the CAS result into request.session.raw_cas:

{ user: 'myusername',
  user_id: '123' }
jsumners commented 8 years ago

I'm away from my computer right now. I will review this soon. But I like the idea. It's a simple solution.

jsumners commented 8 years ago

I like it, but I think it should be optional. And the default should be off. Also, please change the destination branch to the develop branch.