IPWorks EDI 2020 Kotlin Edition

Questions / Feedback?

TokenAuthentication Event

Fired when the client makes use of UsernameToken authentication.

Syntax

public open class DefaultAs4serverEventListener : As4serverEventListener {
  ...
  public override fun tokenAuthentication(e: As4serverTokenAuthenticationEvent) {}
  ...
}

public class As4serverTokenAuthenticationEvent {
  val user: String?
  var password: String?
  val passwordType: String?
  var accept: Boolean
}

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) 2021 /n software inc. - All rights reserved.
IPWorks EDI 2020 Kotlin Edition - Version 20.0 [Build 8033]