- [Fix] Fix broken links in documentation.
- [Feature] Support multivalued attributes (thanks to eric-hostalery). Previously, if multiple values existed for the same attribute, only the first was used. Now you can configure it to use the first, last or all. In that case, a list will be used instead.
- [Feature] Allow skipping attribute sanitization (PR#30, thanks to sebn)
- [Fix] Compatability with Überauth 0.7
- [Other] Use GA as CI tool
- [Other] Test against Elixir 1.13
- [Feature] Allow configuration of validation path (thanks to Yann VERY)
- [Feature] Allow dynamic configuration. This allows dynamically injecting CAS strategies, see PR#11. (thanks to Yann VERY)
- [Fix] Fix when
:sweet_xml
was not in theapplications
. The library now relies on Elixir to automatically populate theapplications
. - [Other] Test against Elixir 1.11
- [Fix] Propagate network errors to Überauth instead of crashing.
- Updated all dependencies.
- More robust error handling. A proper XML parser is now used. Additionally, both the error code and error message are now passed to Überauth (see below).
- Extract all user attributes. The
email
androles
fields are replaced by a fieldattributes
. This field contains all attributes from the response. - More fields are extracted into the Überauth Info struct. By default, the strategy will insert
attributes with the same name (e.g.
cas:location
will be inserted intolocation
). This is configurable (see docs).
There are some small incompatibilities in version 2.
-
There are now more error keys. For example, following response:
<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas"> <cas:authenticationFailure code="INVALID_TICKET">Ticket 'ST-XXXXX' already consumed</cas:authenticationFailure> </cas:serviceResponse>
used to result in
{"error", "INVALID_TICKET"}
. This will now result in{"INVALID_TICKET", "Ticket 'ST-XXXXX' already consumed"}
. Similarly, there is now a separate error code for malformed XML responses. You should be prepared to handle unknown error keys, since they come from the server. -
The raw user struct has changed. The fields
email
androles
have been removed. They can now be found in the newattributes
field, which is a map of all attributes. -
The
email
no longer defaults to the username, but acas:email
attribute. You can configure which attribute is used, see the docs. -
The
roles
field was removed. This didn't actually do anything in the previous version, as it was always the same value.
Note that while not supported in the previous version, parsing attributes as json or yaml is still not supported. Since this doesn't appear to be in the spec, it probably won't be supported. You can always read the field from the attributes and parse it yourself.