Authenticate User

This request is used to authenticate the login credentials of system users and constituent accounts. Constituent accounts that have an active membership will return their current membership details as well. This request can be used as the basis for restricted-access content in your application. It can also be used for a simple check of a constituent user’s account credentials.

However, this is not a true single-sign on. This method, on its own, is not sufficient to integrate with a content management system’s existing login system. This request function is best implemented as a stand-alone authentication method, as it does not create a user session on the NeonCRM server for the constituent user.

REST

Request

https://api.neoncrm.com/neonws/services/api/common/authenticateUser?username=admin&password=xxx&userSessionId=[session id]

Response

{
    "authenticateUserResponse": {
        "operationResult": "SUCCESS",
        "responseMessage": "User logged in.",
        "responseDateTime": "2013-01-27T19:21:02.248-06:00",
        "accountId": 6,
        "isSystemUser": false,
        "name": "Fredericka Monu",
        "isMember": true,
        "currentMembership": {
            "membershipName": "Individual",
            "amount": 175,
            "termDuration": "1 YEAR",
            "enrollmentType": "JOIN",
            "enrollmentDate": "2013-01-27-06:00",
            "startDate": "2012-03-01-06:00",
            "endDate": "2013-02-28-06:00",
            "status": "SUCCEED"
        }
    }
}

SOAP

Request

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:neon="http://www.z2systems.com/schemas/neonws/">
    <soapenv:header>
        <soapenv:body>
            <neon:authenticateuserrequest>
                <usersessionid>T1359336434918</usersessionid>
                <username>admin</username>
                <password>xxxx</password>
            </neon:authenticateuserrequest>
        </soapenv:body>
    </soapenv:header>
</soapenv:envelope>

Response

<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:body>
      <ns2:authenticateuserresponse xmlns:ns2="http://www.z2systems.com/schemas/neonws/">
         <operationresult>SUCCESS</operationresult>
         <responsemessage>User logged in.</responsemessage>
         <responsedatetime>2013-01-27T19:30:46.708-06:00</responsedatetime>
         <accountid>6</accountid>
         <issystemuser>false</issystemuser>
         <name>Fredericka Monu</name>
         <ismember>true</ismember>
         <currentmembership>
            <membershipname>Individual</membershipname>
            <amount>175.0</amount>
            <termduration>1 YEAR</termduration>
            <enrollmenttype>JOIN</enrollmenttype>
            <enrollmentdate>2013-01-27-06:00</enrollmentdate>
            <startdate>2012-03-01-06:00</startdate>
            <enddate>2013-02-28-06:00</enddate>
            <status>SUCCEED</status>
         </currentmembership>
      </ns2:authenticateuserresponse>
   </soap:body>
</soap:envelope>

Request Parameters

Name Required Description
username Yes A constituent account’s login name
password Yes A constituent account’s password

Response Parameters

Name Required Description
accountId Yes
isSystemUser Yes Indicates whether the account is a system user or a constituent user
name Yes User’s first name and last name.
isMember Yes Indicates whether the account has a current membership.
currentMembership.membershipName Yes
currentMembership.amount Yes
currentMembership.termDuration Yes
currentMembership.enrollmentType Yes
currentMembership.enrollmentDate Yes
currentMembership.startDate Yes
currentMembership.endDate Yes
currentMembership.status Yes Active / Inactive

Error Codes

Code Text Description
18 Username is required
19 Password is required
20 Username or password is invalid