linotp.lib.resolver module

resolver objects and processing

linotp.lib.resolver.defineResolver(params)[source]

set up a new resolver from request parameters

Parameters:params – dict of request parameters
linotp.lib.resolver.parse_resolver_spec(resolver_spec)[source]

expects a resolver specification and returns a tuple containing the resolver class identifier and the config identifier

Parameters:resolver_spec

a resolver specification

format: <resolver class identifier>.<config identifier>

Returns:(cls_identifier, config_identifier)
linotp.lib.resolver.getResolverList(filter_resolver_type=None)[source]

Gets the list of configured resolvers

Parameters:filter_resolver_type (string) – Only resolvers of the given type are returned
Return type:Dictionary of the resolvers and their configuration
linotp.lib.resolver.getResolverInfo(resolvername)[source]

return the resolver info of the given resolvername

Parameters:resolvername (string) – the requested resolver

:return : dict of resolver description

linotp.lib.resolver.deleteResolver(resolvername)[source]

delete a resolver and all related config entries

Paramm resolvername:
 the name of the to be deleted resolver
Returns:sucess or fail
Return type:boelean
linotp.lib.resolver.getResolverObject(resolver_spec)[source]

get the resolver instance from a resolver specification.

Remark:internally this function uses the request context for caching.
Parameters:resolver_spec

the resolver string as from the token including the config identifier.

format: <resolver class identifier>.<config identifier>

Returns:instance of the resolver with the loaded config (or None if specification was invalid or didn’t match a resolver)
linotp.lib.resolver.initResolvers()[source]
hook for the request start -
create a deep copy of the dict with the global resolver classes
linotp.lib.resolver.closeResolvers()[source]

hook to close the resolvers at the end of the request

linotp.lib.resolver.setupResolvers(config=None, cache_dir='/tmp')[source]
hook for the server start -
initialize the resolvers