POST Authentication/Login

Method to allow the authentication of a user.

Request Information

URI Parameters

None.

Body Parameters

AuthenticateModel
NameDescriptionTypeAdditional information
UserName

string

Required

String length: inclusive between 4 and 128

Password

string

Required

Data type: Password

String length: inclusive between 6 and 100

CustomerID

integer

None.

TokenDurationHours

byte

Range: inclusive between 0 and 255

Request Formats

application/json, text/json, text/html

Sample:
{
  "UserName": "sample string 1",
  "Password": "sample string 2",
  "CustomerID": 1,
  "TokenDurationHours": 64
}

application/xml, text/xml

Sample:
<AuthenticateModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Toluna.TEF.Common.ViewModels.Membership">
  <CustomerID>1</CustomerID>
  <Password>sample string 2</Password>
  <TokenDurationHours>64</TokenDurationHours>
  <UserName>sample string 1</UserName>
</AuthenticateModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'AuthenticateModel'.

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.

Response Information

Resource Description

Authentication Token/Key

TEFAuthenticationResult
NameDescriptionTypeAdditional information
ContextCustomerID

integer

None.

IsSuperUser

boolean

None.

ManageCustomerIDs

Collection of integer

None.

IdentificationType

TokenType

None.

UserPublicKey

globally unique identifier

None.

Token

string

None.

IsAuthenticated

boolean

None.

ExpirationDateTime

date

None.

Response Formats

application/json, text/json, text/html

Sample:
{
  "ContextCustomerID": 1,
  "IsSuperUser": true,
  "ManageCustomerIDs": null,
  "IdentificationType": 10,
  "UserPublicKey": "1bff0737-3bdc-4816-b1b5-ed25a7f4a161",
  "Token": "sample string 3",
  "IsAuthenticated": true,
  "ExpirationDateTime": "2019-12-13T17:23:37.8065847-05:00"
}

application/xml, text/xml

Sample:
<TEFAuthenticationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Toluna.TEF.Common.ViewModels.Authentication" />

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.