Project

General

Profile

Method: Password generator

Description

Generates different types of passwords.

URL Syntax

/api/{version}/utils/pwgen

HTTP Method

GET

Successful HTTP Response

200

Parameters

Parameter name Description Parameter type Type Mandatory Comment
X-Http-Token StoredSafe token returned upon successful login HTTP Header String * Preferred method
token StoredSafe token returned upon successful login URL-parameter String * Legacy method
type Type to generate; pronounceable, diceword, opie, secure or pin URL-parameter String Optional
length Sets desired length URL-parameter String Optional Valid for pronounceable, secure and pin
language Select language (en_US or sv_SE) URL-parameter String Optional Valid for diceword
delimiter Delimiter between dice words (dash '-', space ' ' or default ',.- _=:') URL-parameter String Optional Valid for diceword and opie
words Number of words (diceword) URL-parameter String Optional Valid for diceword
min_char Minimum number of characters in a word URL-parameter String Optional Valid for diceword
max_char Maximum number of characters in a word URL-parameter String Optional Valid for diceword
policyid Try to match this password policy URL-parameter String Optional

*) One of the methods (HTTP Header or URL-parameter) is required.

Generators

  • secure and pronounceable uses Theodore Ts'o classical pwgen
  • opie uses Thomas Habets fantastic opwgen
  • diceword uses Fredrik Erikssons eminent pwgen

Defaults

No parameters will give type secure and length 40.

Generator Type Length Max length Default Settings Comment
pin Integers 4 40
pronounceable alphanumeric 12 1024
secure alphanumeric and symbols 40 1024
opie alpha 128 bit 128 bit delimiter=space
diceword alpha, national charactes, numbers and symbols language=en_US, words=5, min_char=2, max_char=0, delimiter=,.- _=:

Response Attributes

Attribute Description Type
vault.CALLINFO.errorcodes Number of errors Integer
vault.CALLINFO.errors Number of errors Integer
vault.CALLINFO.general Information Array
vault.CALLINFO.handler Handler used String
vault.CALLINFO.status SUCCESS or FAIL String
vault.CALLINFO.passphrase Generated password String
vault.CALLINFO.length Length of password Integer
vault.CALLINFO.type Password generator used String
vault.CALLINFO.token StoredSafe token String
vault.DATA.token StoredSafe token String
vault.HEADERS.(headers) HTTP Headers String
vault.PARAMS Route parameters (empty) Array
vault.ERRORCODES Error code and text (Only present if errors) Object
vault.ERRORS Error code and text (Only present if errors) Array

Examples

Generates a secure type passwords of 40 characters in length.

Request

GET /api/1.0/utils/pwgen
x-http-token: StoredSafe-Token

Response

HTTP/2 200
content-type: application/json; charset=UTF-8
{
    "CALLINFO": {
        "errorcodes": 0,
        "errors": 0,
        "general": [],
        "handler": "UtilsHandler",
        "status": "SUCCESS",
        "passphrase": "Sz(6Q~si\"`WACS:b\\{[Y~A~Bs+dn\\uTrG5/eG}yf",
        "length": 40,
        "type": "secure" 
        "token": "StoredSafe-Token" 
    },
    "DATA": {
        "token": "StoredSafe-Token" 
    },
    "HEADERS": {
        "Accept": "*/*",
        "Host": "safe.domain.cc",
        "User-Agent": "curl/7.64.1",
        "X-Http-Token": "StoredSafe-Token" 
    },
    "PARAMS": []
}