Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyml
themeRDark
profiles_faculty_type_and_id -> {
   person-id: [...]
   faculty_type: [...]
}
  

As an example, the same attribute provider class could be configured as follows

Code Block
languageyml
themeMidnightRDark
    



    
    {
      class = net.shrine.authz.providerService.attributes.EndpointAttrProvider
      name = profiles_everything
      url = "https://connects.catalyst.harvard.edu/API/Profiles/Public/ProfilesDataAPI/getPeople/xml/ecommonsList/{userId}/columns/affiliation"
      userIdPlaceHolder="{userId}"
      attributeRegexes : [
        {
          name = "everything"
          regex = "(.+)"
        }
      ]
    }

The attributes generated by an EndpointAttrProvider as configured above will have this shape, where "everything" will contain the entire payload from the call to the 3rd party end-point

Code Block
languageyml
themeRDark
profiles_everything -> {
  everything: [...]
}
Code Block
languageyml
themeMidnight
    



    
    
    {
      class = net.shrine.authz.providerService.attributes.RequestHeadersAttrProvider
      name = headers,
      headerNames :
        [
           AJP_userId
           AJP_email
           AJP_firstName
           AJP_lastName
        ]
      }
  ],

  authorizer : {
    name : net.shrine.authz.providerService.authorize.HmsAuthorizer
  }

  ////////////////////////////////////////////////////////////
  // example of an alternate authorizer: RegexAuthorizer    //
  ////////////////////////////////////////////////////////////
  authorizer : {
      name : net.shrine.authz.providerService.examples.RegexAuthorizer
      regexTerms :
          [
             "wb-list.isBlack.false"
             "(wb-list.isWhite.true)|(profiles_faculty_type_and_id.faculty_type.[0-4])"
             "!(fp77)"
          ]

    }

}

...