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

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

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
IdentificationType

TokenType

None.

UserPublicKey

globally unique identifier

None.

Token

string

None.

IsAuthenticated

boolean

None.

ExpirationDateTime

date

None.

Response Formats

application/json, text/json

Sample:
{
  "IdentificationType": 10,
  "UserPublicKey": "13bc2a65-b0c3-4794-b2bd-030801663312",
  "Token": "sample string 2",
  "IsAuthenticated": true,
  "ExpirationDateTime": "2019-08-18T22:17:57.3011622-04:00"
}

text/html

Sample:
{"IdentificationType":10,"UserPublicKey":"13bc2a65-b0c3-4794-b2bd-030801663312","Token":"sample string 2","IsAuthenticated":true,"ExpirationDateTime":"2019-08-18T22:17:57.3011622-04: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.