Enforcer
- class scitokens.Enforcer(issuer, audience=None)[source]
Bases:
objectEnforce SciTokens-specific validation logic.
Allows one to test if a given token has a particular authorization.
This class is NOT thread safe; a separate object is needed for every thread.
Methods Summary
add_validator(claim, validator)Add a user-defined validator in addition to the default enforcer logic.
generate_acls(token)Given a SciToken object and the expected issuer, return the valid ACLs.
test(token, authz[, path])Test whether a given token has the requested permission within the current enforcer context.
Methods Documentation
- add_validator(claim, validator)[source]
Add a user-defined validator in addition to the default enforcer logic.