Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.2
-
None
Description
Needed to simplify interaction for stateless usages. Helps over REST, caller doesn't have to hold, parse, cache a session from createSession, before calling checkAccess. One less roundtrip when needing to do both consecutively.
Below the format for the new checkAccess API.
API Signature
public boolean checkAccess
( User user,
Permission perm,
boolean isTrusted )
throws SecurityException;
Sample XML Request:
<FortRequest>
<contextId>HOME</contextId>
<entity xsi:type="permission" xmlns:...">
<objName>account</objName>
<opName>withdrawal</opName>
</entity>
<entity2 xsi:type="user" xmlns:xsi=“...">
<userId>curly</userId>
<props>
<entry>
<key>locale</key>
<value>east</value>
</entry>
</props>
</entity2>
<isFlag>true</isFlag>
</FortRequest>
Sample XML Response:
<FortResponse>
<errorCode>0</errorCode>
<isAuthorized>true</isAuthorized>
</FortResponse>