Root element and types

The OTP configuration file starts with the --- and then contains types element:

---
types:
    - ...
    - ...


  • key - contains a unique OTP type identification. There is a convention for it:

    • all letters written in capitals (upper case)

    • with - between words.

types:
    - keySIGN-IN
      ...
    - keyORDER
      ...


  • length - password length.

  • pattern - password generating that match a given regular expression.

  • receiverTypeKey - receiver type identifier for communication (PHONE-NUMBERUSER-IDEMAILIP or NAME)

  • message - localized message via map structure with FreeMarker template for otp value. Example:

    • key - is ISO 639-1 code.

    • value - localized message template.

  • maxRetries - maximum amout of incorrect retries.

  • ttl - maximum time to live of password.

  • otpSenderId - sender identifier (source address for short messages and subject for e-mails).


Example:

types:
    - 
keySIGN-IN
      
length4
      
pattern"[ab]{4,16}c"
      
receiverTypeKey"PHONE-NUMBER"
      
message{ "en": "Your OTP ${otp}"}
      
maxRetries3
      
ttl600
      
otpSenderIdXM