Topic Path: Symbol Reference > Classes > TIdSASLPlain Class > TIdSASLPlain Methods > StartAuthenticate Method
ContentsIndexHome
PreviousUpNext
TIdSASLPlain.StartAuthenticate Method

Builds the the client response using values for the PLAIN SASL authentication mechanism.

function StartAuthenticate(
    const AChallenge: string
): String; override;
Parameters 
Description 
AChallenge 
Server challenge for the SASL authentication exchange. 

string - Client response to the server challenge.

StartAuthenticate is an overridden String function used to build the client response to the SASL serve challenge in AChallenge. 

StartAuthenticate uses the values in LoginAs, and the Username and Password from UserPassProvider to build the the client response for the PLAIN SASL authentication mechanism. 

The PLAIN SASL authentication mechanism consists of a single message from the client to the server, including the following: 

  • authorization identity (optional identity to login as)
  • US-ASCII NUL character
  • authentication identity (identity whose password will be used)
  • US-ASCII NUL character
  • clear-text password (for the authentication identity)
 

The client may use a blank authorization identity in LoginAs to indicate that it is the same as the authentication identity (Username). 

Non-US-ASCII characters are permitted in values used for the authorization identity, authentication identity, or password as long as they are represented in UTF-8 form. Use of non-visible characters or characters which a user may be unable to enter on some keyboards is discouraged. The following table represents the UTF-8 character ranges allowed in the values: 

 

(Hex) 
01-09 
0B-0C 
0E-7F 
C0-DF 
E0-EF 
F0-F7 
F8-FB 
FC-FD 

LoginAs Username Password TIdUserPassProvider

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.