EDI Integrator V9 - Online Help
Available for:
EDI Integrator V9
Questions / Feedback?

TokenAuthentication Event

Fired when the client makes use of UsernameToken authentication.

Syntax

[VB.NET]
Public Event OnTokenAuthentication As OnTokenAuthenticationHandler
[C#]
public event OnTokenAuthenticationHandler OnTokenAuthentication;

public delegate void OnTokenAuthenticationHandler(object sender, As4serverTokenAuthenticationEventArgs e);

class As4serverTokenAuthenticationEventArgs : EventArgs {
  string User {get;}
  string Password {get; set;}
  string PasswordType {get;}
  bool Accept {get; set;}
}

Remarks

This event fires when a client sends a request that includes UsernameToken authentication. This is typically only used by clients initiating a pull request.

User identifies the user.

Password should be set from within the event if PasswordType is 0 (digest). This parameter can be read when PasswordType is 1 (text).

PasswordType specifies the type of password. Possible values are:

  • 0 (Digest)
  • 1 (Text)

Accept may be set to manually accept the request.

When PasswordType is 0 (Digest) set the Password parameter to the plaintext password. Do not set Accept The component will hash the provided password value and compare it to the value in the request. If it matched the component will accept the request. If it does not match the component will populate Errors with an error indicating authentication has failed.

When PasswordType is 1 (Text) the Password parameter will hold the exact value received in the request. Inspect Password and determine whether to accept the request. To accept the request set Accept to True.

After this event fires if authentication failed Errors will contain an appropriate error. Send the errors back to the client by calling SendResponse.

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0