TokenManagerClient

The TokenManagerClient is a class representing the client of the DIRAC TokenManager service.

class DIRAC.FrameworkSystem.Client.TokenManagerClient.TokenManagerClient(**kwargs)

Bases: Client

Client exposing the TokenManager Service.

__init__(**kwargs)

C’tor.

Parameters:

kwargs – just stored as an attribute and passed when creating the RPCClient

property call

To be removed once we’re sure self.call has been removed

Type:

Deprecated

executeRPC(*parms, **kws)

This method extracts some parameters from kwargs that are used as parameter of the constructor or RPCClient. Unfortunately, only a few of all the available parameters of BaseClient are exposed.

Parameters:
  • rpc – if an RPC client is passed, use that one

  • timeout – we can change the timeout on a per call bases. Default is self.timeout

  • url – We can specify which url to use

getClientKWArgs()

Returns a copy of the connection arguments

getServer()

Getter for the server url. Useful ?

getToken(**kwargs)

Get an access token for a user/group keeping the local cache

Parameters:
  • username – user name

  • userGroup – group name

  • scope – scope

  • audience – audience

  • identityProvider – identity Provider

  • requiredTimeLeft – required time

Returns:

S_OK(dict)/S_ERROR()

httpsClient

alias of TornadoClient

setServer(url)

Set the server URL used by default

Parameters:

url – url of the service