docs » Token

generate google authenticator token value keystrokes Retrieve a google authenticator token seed from keychain and use this to calculate the current value Simulate keystrokes for this token value

written by Teun Vink github@teun.tv, converted to spoon by Tyler Thrailkill

https://github.com/teunvink/hammerspoon

API Overview

API Documentation

Variables

logger
Signature Token.logger
Type Variable
Description

Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon.

secret_key
Signature Token.secret_key
Type Variable
Description

String indicating the Keychain name of the Shared Key used in the OTP HMAC-SHA1 generation

Methods

bindHotkeys
Signature Token:bindHotkeys(mapping)
Type Method
Description

Binds hotkeys for Token

Parameters:

  • mapping - A table containing hotkey modifier/key details for the following items:
    • generate - generate and type token
get_token
Signature Token:get_token()
Type Method
Description

Retrieves the token using an HOTP/TOTP Secret Key stored in the keychain

token_keystroke
Signature Token:token_keystroke()
Type Method
Description

read a token secret key from keychain, generate a code and make keystrokes for it