EndPreviousNextEnd EndPrint This TopicEnd

GetPasswordPolicyInfo

When someone registers a new account, or changes their password, their password should be checked that it matches the site’s password policy

 

The GetPasswordPolicyInfo webservice is used to get the password policy settings, and to provide a regular expression to test password against.

 

The settings for this password policy look like this in the Contegro admin…

Password Policy Settings

Complexity requirements

The “Complexity Requirements” tickbox means that the password…

Cannot be the same as the login name

Cannot be the same as the email address

Cannot be only sequential numbers (i.e. 123456 / 45678)

Cannot be only sequential letters (i.e. abcde / hijklmn)

Cannot match a password in Contegro’s list of disallowed passwords

 

The API does not return any information about the complexity requirements, these tests will be done on the server

 

Data to be passed to the webservice

Variable name

Data type

Description

authToken

String

The authentication token for your session

 

Data which is returned

Variable name

Data type

Description

regex

String

A regular expression which you can use to test if a password is valid or not

Please note: The regular expression does not check if a password meets password complicity requirements

An example of a regex value is: ^(?=.*[a-z])(?=.*\d).{10,}$

passwordPolicyDescription

String

A description of the password policy (i.e. “Your password must be at least 10 characters long and include lowercase letters and numbers.”)

errorCode

String

If your request was successful, the errorCode will be 0

If your request had a problem, there will be an error code for each kind of problem

errorMessage

String

A description of the problem with your error request (if there was a problem)

If your request was successful, this will be an empty string

 

 

Example XML for a CreateUser request

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <GetPasswordPolicyInfo xmlns="http://contegro.com/">

      <authToken>14ffdfd6-78c3-4fc0-9c63-3902011640af</authToken>

    </GetPasswordPolicyInfo>

  </soap:Body>

</soap:Envelope>

 

 

Example XML which is returned

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <GetPasswordPolicyInfoResponse xmlns="http://contegro.com/">

      <GetPasswordPolicyInfoResult>

        <regex>^(?=.*[a-z])(?=.*\d).{10,}$</regex>

        <passwordPolicyDescription>Your password must be at least 10 characters long and include lowercase letters and numbers</passwordPolicyDescription>

        <errorCode>0</errorCode>

        <errorMessage> </errorMessage>

      </GetPasswordPolicyInfoResult>

    </GetPasswordPolicyInfoResponse>

  </soap:Body>

</soap:Envelope>

 

 

 

Topic Link