Go to Dymo
Dymo | Public API

Public API

🔑 Password Validation

With this public functionality you can validate a password given a security policy.


Information

  • All passwords will be checked for a maximum of 100 (default) characters.
  • It will be verified that they have at least 2 digits, and that they do not have characters out of the common ones.
  • All passwords will be checked for both SQL and NoSQL iyentions and spaces, and cannot be common passwords.
  • It will be assessed that the password has at least 8 (default) unordered digits, uppercase, lowercase and at least one symbol.
  • If an email address is provided, it will be checked to ensure that it does not match the email address or the email user.

🎯 Parameters



data: {
    password: {
        description: "Refers to the password to be validated.",
        type: String,
        methods: [ Params ],
        nested: [ ]
    },
    email: {
        description: "Refers to the email address linked to the password to be validated.",
        type: String,
        default: undefined,
        methods: [ Params ],
        nested: [ password ]
    },
    bannedWords: {
        description: "Refers to the forbidden words in the password.",
        // String Arrays are accepted.
        type: Array,
            items: String,
        default: [ ],
        requirements: {
            minimum: 0,
            maximum: 10
        },
        methods: [ Params ],
        nested: [ password ]
    },
    min: {
        description: "Refers to the minimum length of the password.",
        type: Integer,
        default: 8,
        requirements: {
            minimum: 8,
            maximum: 32
        },
        methods: [ Params ],
        nested: [ password ]
    },
    max: {
        description: "Refers to the maximum length of the password.",
        type: Integer,
        default: 100,
        requirements: {
            minimum: 32,
            maximum: 100
        },
        methods: [ Params ],
        nested: [ password ]
    }
}
                                                

🔥 cURL



set password=PASSWORD_REQ
set [email protected]
set bannedWords=[appName, test, companyName]
set min=16
set max=52


curl -X GET "https://api.tpeoficial.com/v1/public/validPwd?password=%password%&email=%email%&min=%min%&max=%max%"
                                                

✅ All possible responses



{
    "valid": false,
    "password": "PASSWORD_REQ",
    "details": [
        {
            "validation": "spaces",
            "message": "The password cannot contain spaces."
        },
        {
            "validation": "bannedWords",
            "message": "The password cannot contain the word \"foundWord\".",
            "word": "foundWord"
        },
        {
            "validation": "hasSql",
            "message": "Password injections are not allowed."
        },
        {
            "validation": "blacklist",
            "message": "The password is too common."
        },
        {
            "validation": "min",
            "message": "The password must be at least 8 characters long."
        },
        {
            "validation": "max",
            "message": "The password must be no longer than 100 characters."
        },
        {
            "validation": "digits",
            "message": "The password must have at least 2 digits."
        },
        {
            "validation": "letters",
            "message": "The password must have upper and lower case letters."
        },
        {
            "validation": "symbols",
            "message": "The password must contain at least one special symbol/character."
        },
        {   
            "validation": "email",
            "message": "The email user and password cannot match."
        },
        {   
            "validation": "userEmail",
            "message": "The email user and password cannot match."
        }
    ]
}
                                                

BASE URL

Public

https://api.tpeoficial.com/v1/public/validPwd

Language Box

Was this section helpful?