This chapter will describe a sample servlet filter, that provides authentication and attribute retrieval using the Mellon2 API. The actual steps taken are identical to those for interactive authentication. Ticket-based SSO is not supported, and exceptions are not trapped (that is, they are thrown as ServletExceptions from the filter).
For more on servlet filters, please read this article.
Please note that this filter implementation has been designed to be as backwards compatible with the corresponding Mellon1 servlet filter as possible.
More information may be found in the servlet filter's JavaDoc.
The Mellon2 Java client-side API contains both the Java API itself and the servlet filter.
Please refer to the Mellon2 API download section.
A number of configuration properties are available for use with the Mellon2 servlet filter. Some of these are optional, while others are required.
A configuration property can be set using one of three methods.
The following configuration properties are available for use with the Mellon2 servlet filter.
Property | Required | Description |
---|---|---|
no.feide.mellon.serviceUsername | Yes | The Moria2 service account's username. |
no.feide.mellon.servicePassword | Yes | The Moria2 service account's password. |
no.feide.mellon.endpoint | Yes | The SOAP v2.1 service endpoint of the Moria2 instance you are using. Please refer to this section for a list of service endpoints provided by FEIDE. |
no.feide.mellon.requestedAttributes | No | The attributes to request from Moria2, as a comma-separated list. |
With the exception of no.feide.mellon.endpoint, this list is identical to the Moria1 configuration properties.
Example /mellon.properties configuration file:
# The service credentials. no.feide.mellon.serviceUsername=demo_service no.feide.mellon.servicePassword=demo_service # The attributes requested from Moria2. no.feide.mellon.requestedAttributes=eduPersonAffiliation,eduPersonOrgDN # The Moria2 service endpoint. no.feide.mellon.endpoint=https://login.feide.no/moria2/v2_1/Authentication