Class TestClaimSource

  • All Implemented Interfaces:
    Serializable, org.oa4mp.delegation.server.server.claims.ClaimSource

    public class TestClaimSource
    extends BasicClaimsSourceImpl

    This is to test creating claim sources using the introspection abilities of OA4MP. It has to live in this package (rather than in some test harness) because part of the contract is that it is resolvable at runtime and test code is not available.

    Generally, this does virtually nothing except spit out a few dummy claims. It is therefore of no use and can be safely ignored. It's function is to be an example of how to write a custom claim source.

    Created by Jeff Gaynor
    on 10/6/20 at 8:30 AM

    See Also:
    Serialized Form
    • Constructor Detail

      • TestClaimSource

        public TestClaimSource()
    • Method Detail

      • realProcessing

        protected net.sf.json.JSONObject realProcessing​(net.sf.json.JSONObject claims,
                                                        javax.servlet.http.HttpServletRequest request,
                                                        org.oa4mp.delegation.server.ServiceTransaction transaction)
                                                 throws org.oa4mp.delegation.server.server.UnsupportedScopeException
        Description copied from class: BasicClaimsSourceImpl
        This is the actual place to put your code that only processes the claim source. The BasicClaimsSourceImpl.process(JSONObject, HttpServletRequest, ServiceTransaction) calls wrap this and invoke the pre/post processor for you. Your code should take whatever metadata is for the user and add it to the claims object.
        Overrides:
        realProcessing in class BasicClaimsSourceImpl
        Returns:
        Throws:
        org.oa4mp.delegation.server.server.UnsupportedScopeException