Hi
i've the same problem, but sometimes work fine.
I am using the example provided xDemoExternalProvidersLoginWebpage downloaded from
https://docs.lansa.com/14/EN/lansa018/i ... y%7C_____3
to implement SSO
The code as downloaded on AS400 it did not work, then I added the MiscProperty as indicated in this discussion, it works occasionally
follow the code segment
Code: Select all
£Req <= *New £XPRIM_HttpRequest
£Response <= *New £XPRIM_RandomAccessJsonReader
£Url <= *New £XPRIM_UriBuilder
£Url.SetScheme SCHEME("https")
£Url.SetHost HOST('login.microsoftonline.com')
£Url.SetPort PORT(443)
£Url.SetPath PATH('/f22af536-d2e3-4b57-a7b8-ab91e7cd3906/oauth2/v2.0/token')
£Req.Clear
£Req.Content.AddUrlEncodedFormValue( 'client_id' '*************************' )
£Req.Content.AddUrlEncodedFormValue( 'scope' 'user.read mail.read' )
£Req.Content.AddUrlEncodedFormValue( 'code' £AuthorizationCode )
£Req.Content.AddUrlEncodedFormValue( 'redirect_uri' £gLoginCallbackUrl )
£Req.Content.AddUrlEncodedFormValue( 'grant_type' 'authorization_code' )
£Req.Content.AddUrlEncodedFormValue( 'client_secret' '****************************' )
£Req.Options.SetTimeout SECONDS(10)
£Req.Options.SetMiscProperty NAME('sni_fqdn') VALUE('login.microsoftonline.com')
£Req.Options.SetMiscProperty NAME('app_id') VALUE('QIBM_QTV_TELNET_CLIENT')
£Req.options.SetMiscProperty NAME('sni_critical') VALUE('false')
£Req.DoPost URL(£Url)
The behaviour is as follows:
it manages to retrieve the token once,
then stops working and returns the message:
Failed to send outgoing data to the server, HTTPTransportException: Cannot initialize a channel to the remote end.
Failed to establish SSL connection to server, the operation gsk_secure_soc_init() failed.
GSKit Error is 6000 - Il certificato non è firmato da una autorità di certificazione affidabile.
After few mitues, work corectly
Follow a sample trace
Code: Select all
094444 -------------------------------------------
094452 Url....................: https://login.microsoftonline.com/f22af536-d2e3-4b57-a7b8-ab91e7cd3906/oauth2/v2.0/token
094452 IsSuccessfulRequest....: TRUE
094452 IsSuccessHttpStatusCode: TRUE
094452 HttpStatusCode.........: 200
094452 ErrorMessage...........:
094452 ErrorCode..............:
094452 -------------------------------------------
094458 Url....................: https://login.microsoftonline.com/f22af536-d2e3-4b57-a7b8-ab91e7cd3906/oauth2/v2.0/token
094458 IsSuccessfulRequest....: FALSE
094458 IsSuccessHttpStatusCode: FALSE
094458 HttpStatusCode.........: 0
094458 ErrorMessage...........: Failed to send outgoing data to the server, HTTPTransportException: Cannot initialize a channel to the remote end.
Failed to establish SSL connection to server, the operation gsk_secure_soc_init() failed.
GSKit Error is 6000 - Il certificato non è firmato da una autorità di certificazione affidabile.
094458 ErrorCode..............: CONNECTION_ERROR
094458 -------------------------------------------
As you can see, the first request response is Ok with Http Status 200, the next end in error.
My impression is that after the first success, the certificate is lost.
Has this ever happened to you?
Do you have any suggestions for this specific case?
MARCO ROSSI | Software Developer Sr. - Software Production