Title: OAuth 1 authentication Post by: Stefan S. on September 20, 2017, 09:53:21 am Hello,
we have to connect to a Webservice with an OAuth 1.0 Authentication. We can receive the consumer-token, but we are not able to get the correct request token. We always receive an "HTTP/1.1 401 Unauthorized" Error. Has someone already succeeded an OAuth 1 Authentication with Genero Webservice? Any help is welcome. Stefan Title: Re: OAuth 1 authentication Post by: Laurent G. on September 20, 2017, 06:10:51 pm Hello Stefan,
Our Documentation and Examples are all naming 'OAuth2' (mainly because it is referring to Google Services). Do you have test credentials so you can share a basic sample? I would recommend you contact your local Four Js support center while you're waiting for some feedback from the community Best Laurent Title: Re: OAuth 1 authentication Post by: Stefan S. on September 21, 2017, 07:51:27 am Hello Laurent,
attached our testprogram. I think our Problem is in generating the signature. We have to build a signature with HMAC-SHA1 (https://tools.ietf.org/html/rfc5849#section-3.4.2) This should be done like this: digest = HMAC-SHA1 (key, text) In the Genero-Docu we found the function “security.Digest.CreateDigestString” This function requires a Base-64 String as Input. We think that this can be the Problem. Before you start the program, you have to add the following lines to the fglprofile: ws.discovergy.url = "https://api.discovergy.com/public/v1/oauth1/consumer_token" ws.discovergy.verifyserver = "FALSE" ws.discovergy1.url = "https://api.discovergy.com/public/v1/oauth1/request_token" ws.discovergy1.verifyserver = "FALSE" Stefan S. Title: Re: OAuth 1 authentication Post by: Sisavanh S. on October 05, 2017, 10:35:41 am Hi,
Just to let you know that we provided Stephan with a sample. Indeed, to build the signature there are specifications/conventions you need to comply to. It is not a complete implementation of OAuth 1.0. There are 2 main functions - DoAuth1Request: to do the OAuth request with the signature - ParseOAuth1RequestTokenResponse: to get the OAuth response Find attached an excerpt of the sample. Best regards, Sisa. Best regards, Sisa. |