Author Message
DonMonheim
Joined: Aug 19, 2016
Messages: 36
Offline
Hello

We have a custom built user interface that makes use of the UAC to authenticate users upon accessing our application. Currently, we are seeing a 400 error as the response from the UAC when attempting to authenticate. The specific problems seem to be failed parameter validation. Here is what our AvayaIdentityServices configuration object looks like:

AvayaIdentityServicesConfiguration{
serverInfo: {apiUrl:"{host}/services/UAC/UACAPI"},
clientInfo: {id:"testuser"},
enabled: true
}


The parameters failing validation are:
  • Authorization (response value: ****)

  • clientid (no response value)

  • sdkversion (no response value)


  • I am unable to find any documentation that explicitly details the required configuration object parameters. If someone could please point me to the proper information or provide said information it would be greatly appreciated.
    SDK_IDMS_Package
    Joined: Feb 22, 2017
    Messages: 7
    Offline
    Hi Don,

    have you tried the example application bundled with the SDK package?, or the 'get started' code sample here:

    http://www.devconnectprogram.com/site/global/products_resources/avaya_client_sdk/programming_docs/current/javascript/identity_management/guide/tutorial.gsp

    You should be able to just change the 'apiUrl' in the sample app, and get it to work straightaway.
    What exact HTTP Response Code are you seeing - 400?.
    Are you seeing a response body being returned?, and if so what is it?
    Also, make sure to use 'https' when specifying the 'apiUrl'.
    Also, can you specify the version of UAC & the SDK that you are using.

    thanks,

    IDMS Package Support
    DonMonheim
    Joined: Aug 19, 2016
    Messages: 36
    Offline
    have you tried the example application bundled with the SDK package?
    A: Yes

    You should be able to just change the 'apiUrl' in the sample app, and get it to work straightaway.
    A: We did this

    What exact HTTP Response Code are you seeing - 400?.
    A: As detailed in the original post, 400

    Are you seeing a response body being returned?, and if so what is it?
    A: {"type":"errorResponse","status":400,"errorMessage":"Validation failed","applicationErrorCode":400000,"validationErrors":[{"parameterName":"Authorization","parameterValue":"****","message":"Parameter failed validation"},{"parameterName":"clientid","message":"Parameter failed validation"},{"parameterName":"sdkversion","message":"Parameter failed validation"}]}


    Also, make sure to use 'https' when specifying the 'apiUrl'.
    A: We are, we have also attempted http

    Also, can you specify the version of UAC & the SDK that you are using.
    A: UAC-3.2.1.0.1101 SDK-3.0.0.0 build 30
    SDK_IDMS_Package
    Joined: Feb 22, 2017
    Messages: 7
    Offline
    Hi Don,

    thanks for the reply.

    Can you tell me what version of the SDK is being sent up in the querystring for the auth request - i.e. open the network tab in chrome dev tools, and you should be able to see the request.

    thanks,

    IDMS Package Support

    SDK_IDMS_Package
    Joined: Feb 22, 2017
    Messages: 7
    Offline
    Hi Don,

    OK, I see the problem - the version of the SDK that works with UAC version 3.2.1 is the 3.0.0.1 release (UAC 3.2.0 works with the 3.0.0.0 SDK).
    Can you download that, and try the sample app and let me know if it works for you.

    http://www.devconnectprogram.com/site/global/products_resources/avaya_client_sdk/developer_downloads/3_0_0_1/index.gsp

    thanks,

    IDMS Package Support
    DonMonheim
    Joined: Aug 19, 2016
    Messages: 36
    Offline
    This is why we wanted the documentation that explicitly details the required configuration object parameters.

    The authenticate method requires a username and password be passed to it, it also looks for an apiURL and id. Nowhere in the sample app does it specify that a SDK version should be passed.

    Our querystring thus does not contatin an SDK version number it is formatted as such:

    auth?username=[OUR USERNAME]&password=[OUR PASSWORD]
    DonMonheim
    Joined: Aug 19, 2016
    Messages: 36
    Offline
    Alright we downloaded the "JavaScript SDK, Release 3.0.0.1" zip from the link you provided, when we went to run our solution it said we actually had Client SDK version 3.2.1. Client ID = unkown. This attempt was unsuccessful.
    SDK_IDMS_Package
    Joined: Feb 22, 2017
    Messages: 7
    Offline
    Hi Don,

    Thanks for your patience.

    The SDK version doesn't need to be set, it is sent by the 3.0.0.1 package transparently.
    Does the sample app from the 3.0.0.1 work for you when you update the 'apiUrl'?

    These are the required properties for the configuration object:



    var config = {
    serverInfo: {
    apiUrl: 'https://{UAC}/services/UAC/UACAPI'
    },
    clientInfo: {
    id: 'testApp'
    },
    enabled: true
    };


    thanks

    IDMS Package Support
    DonMonheim
    Joined: Aug 19, 2016
    Messages: 36
    Offline
    This is what our code currently looks like:

    export const environment = {
    
    production: false,

    // environment specific configuration - Update accordingly
    config: {
    // Begin Avaya Identity Services Configuration Block
    AvayaIdentityServicesConfiguration: {
    serverInfo: {
    apiUrl:"https://{UAC}/services/UAC/UACAPI"
    },
    clientInfo: {
    id:"testApp"
    },
    enabled: true
    }
    // End Avaya Identity Services Configuration Block
    }
    };
    SDK_IDMS_Package
    Joined: Feb 22, 2017
    Messages: 7
    Offline
    Hi Don,

    Thanks for that.

    Again, does the sample app from the 3.0.0.1 work for you when you update the 'apiUrl'?

    I used you code snippet in the sample app, without problem - here is how I referenced the config:

    var client = new AvayaIdentityServices(environment.config.AvayaIdentityServicesConfiguration);

    Is this similar to how you're doing it in your app?
    What other libraries are you using? Angular 2?

    You say the last attempt was unsuccessful - can you give more details? what querystring was passed? what response was received?

    thanks

    IDMS Package Support
    DonMonheim
    Joined: Aug 19, 2016
    Messages: 36
    Offline
    We have not changed our apiUrl, we simply chose to denote it as "{host}/services/UAC/UACAPI" instead of "https://{UAC}/services/UAC/UACAPI" as you did in your latter post. We altered the way we denoted it in the hopes of avoiding further confusion on that issue.

    I'll have to double check on the config later as I do not have the current code on this local machine.

    We are using plenty of other libraries including Angular 2.

    querystring: auth?sdkversion=3.2.1&clientid=unknown

    response: I am a receiving a message saying "Failed to load response data"
    DonMonheim
    Joined: Aug 19, 2016
    Messages: 36
    Offline
    Here is our config:

    this.config = environment.config;
    this.client = new AvayaIdentityServices(this.config.AvayaIdentityServicesConfiguration);
    Go to:   
    Mobile view