# salt.tokens.localfs

Stores eauth tokens in the filesystem of the master. Location is configured by the master config option 'token_dir'

salt.tokens.localfs.get_token(opts, tok)

  Fetch the token data from the store.

  Parameters:

    - opts -- Salt master config options

    - tok -- Token value to get

  Returns:

    Token data if successful. Empty dict if failed.

salt.tokens.localfs.list_tokens(opts)

  List all tokens in the store.

  Parameters:

    opts -- Salt master config options

  Returns:

    List of dicts (tokens)

salt.tokens.localfs.mk_token(opts, tdata)

  Mint a new token using the config option hash_type and store tdata with 'token' attribute set to the token. This module uses the hash of random 512 bytes as a token.

  Parameters:

    - opts -- Salt master config options

    - tdata -- Token data to be stored with 'token' attribute of this dict set to the token.

  Returns:

    tdata with token if successful. Empty dict if failed.

salt.tokens.localfs.rm_token(opts, tok)

  Remove token from the store.

  Parameters:

    - opts -- Salt master config options

    - tok -- Token to remove

  Returns:

    Empty dict if successful. None if failed.