Open GoogleCodeExporter opened 9 years ago
EDIT: Found the answer:
The adaptor can implement the interface AuthzAuthority
In the init you need to bind the adaptor (or AuthzAuthority class) to the
context.
@Override
public void init(AdaptorContext context) throws Exception {
// Process configuration.
...
AuthzAuthority authzAuthority = this;
context.setAuthzAuthority(authzAuthority);
s....
}
isUserAuthorised adds the logic for authentication:
@Override
public Map<DocId, AuthzStatus> isUserAuthorized(AuthnIdentity identity, Collection<DocId> ids) {
Map<DocId, AuthzStatus> result = new HashMap<DocId, AuthzStatus>(ids.size() * 2);
for (DocId id : ids) {
result.put(id, AuthzStatus.PERMIT);
}
return Collections.unmodifiableMap(result);
}
Original comment by robbert....@gmail.com
on 29 Aug 2014 at 10:38
Original issue reported on code.google.com by
robbert....@gmail.com
on 29 Aug 2014 at 10:17