Posted by bronco on 13-Dec-2017 08:02

I have an IhybridRealm implementation as below. AT first everything is OK, the user is autheticated, all the attributes get their correct value. Everybody happy.

But when I add 

The user is no longer authenticated. I get 403's. This seems a bug to me. OE 11.7.2 on linux.
class auth.PasoeAuth implements IHybridRealm: 

  method public character GetAttribute(cUserid as integer, attrName as character):

    define variable attrValue as character no-undo.

    case attrName:
      when 'ATTR_ROLES' then attrValue = 'PSCUser'.
      when 'ATTR_ENABLED' then attrValue = 'T'.
      when 'ATTR_LOCKED' then attrValue = 'F'.
      when 'ATTR_EXPIRED' then attrValue = 'F'.
      when 'test2' then attrValue = 'hatsekidee!'.
    end case.

    message attrName '=' attrValue.
    return attrValue.
  end method.

  /* ... */
end class.

All Replies

Posted by bronco on 13-Dec-2017 08:05

Sorry about the cryptic title, I pressed send too fast. If I alter my post it will probably gone, so I just leave it like this...

Posted by bronco on 13-Dec-2017 12:45

Fixed it. Deep down the documentation is stated that the custom attributes defined in OERealm.UserDetails.propertiesAttrName should contain JSON. No clue why this is a good idea...

bottom line:

when 'test2' then attrValue = '~{ "value": "hatsekidee!"}'.

is what it should be. Then on the appserver code you have to do a hcp:get-property('test2') and parse the JSON. It seems a bit over complicated to me.

This thread is closed