Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security_Authenticate call in SoapHeader 4 does a double authentication #151

Closed
arosha445 opened this issue Feb 21, 2018 · 11 comments
Closed
Labels
Milestone

Comments

@arosha445
Copy link
Contributor

arosha445 commented Feb 21, 2018

When ever i do a securityAuthenticate request i get this ERR as a result even after a securitySignOut
However after the securityAuthenticate request i can do all other requests such as FareMasterPricerCalendar, FareMasterPricerTravelboardSearch etc.

"status": "ERR",

"messages": [
{
"code": "16001",
"text": "You have already signed-in. Please sign-out first.",
"level": null
}
],
"response": {
"errorSection": {
"applicationError": {
"errorDetails": {
"errorCode": "16001",
"errorCategory": "EC",
"errorCodeOwner": "LSS"
}
},
"interactiveFreeText": {
"freeTextQualif": {
"subject": "3",
"infoType": "TXT",
"language": "EN"
},
"freeText": "You have already signed-in. Please sign-out first."
}
}
},`

This is what i get after **securitySignOut**

`"status": "OK",
"messages": [],
"response": {
"processStatus": {
"statusCode": "P"
}
},
@DerMika
Copy link
Collaborator

DerMika commented Feb 21, 2018

Which SoapHeader is being used in your WSAP?

@arosha445
Copy link
Contributor Author

It's using Soap Header Version 4.0

@DerMika
Copy link
Collaborator

DerMika commented Feb 21, 2018

Ok, 2 things:

  1. Can you provide me with the full SOAP request and responses? See Logging request and response in the docs.
  2. It's actually not necessary to send a Security_Authenticate message with Soap Header 4. You can just send the message you wish to send, and the library will automatically send authentication data to initialize a new session.

@DerMika
Copy link
Collaborator

DerMika commented Feb 21, 2018

I suspect that the security_authenticate it sends on SoapHeader 4 has auth headers in the headers, as well as authentication data in the message body. That would explain this error.

@arosha445
Copy link
Contributor Author

arosha445 commented Feb 21, 2018

This is the request and response i got from the log
Security_AuthenticateRequest
Security_AuthenticateResponse

If it's not necessary to send a Security_Authencticate, is it also not necessary to do a securitySignOut ? Does the library do signout as well?

@DerMika
Copy link
Collaborator

DerMika commented Feb 21, 2018

No, a Signout has to be implemented by you yourself. Otherwise you will have problems when trying to get the application certified by Amadeus (which is needed for production access). That is because an active session uses server resources on Amadeus' infrastructure.

Session signout is explained here

@DerMika DerMika added the bug label Feb 21, 2018
@DerMika
Copy link
Collaborator

DerMika commented Feb 21, 2018

Yes, looking at your request XML, it's as I feared. The library adds authentication headers to the Security_Authenticate message, which in fact makes the message a double authentication message.

I will have to fix that.

But in the mean time just call the message you need, and let the library handle the authentication.

@DerMika DerMika changed the title Security_AuthenticateReply Security_Authenticate call in SoapHeader 4 does a double authentication Feb 21, 2018
@arosha445
Copy link
Contributor Author

Yes. I can do all the operations without this. But i was trying to implement a signIn test for phpUnit.
Anyway thanks a lot @DerMika for your time and consideration.

@irfanbaigse
Copy link

@DerMika can you pls fix authentication headers ?

@DerMika
Copy link
Collaborator

DerMika commented Mar 11, 2018

This isn't urgent at all, since it's not necessary to do a separate authentication call in SoapHeader 4.

Just call the message you need, and the session will be started by the client.

@DerMika
Copy link
Collaborator

DerMika commented Oct 24, 2018

This bug should be fixed now on master since merging #234. It'll be included in the 1.8.0 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants