01-17-2015 5:33 AM
Hi All,
I'm trying to integrate Oauth 2.0 in my NW 7.4 AS ABAP with Google and when i try to execute the request im getting the following error in the SEC_TRACE_ANALYSER report.
Kindly help me.
REgards
Karthik
01-21-2015 4:26 AM
Hi,
I was able to finally solve the issue that is no Upgrade issue.
We have to change in the BADI class Implementation
I have followed the Following blog (http://wiki.scn.sap.com/wiki/display/Security/Access+Google+APIs+using+the+OAuth+2.0+Client+API)
But in that the particular implmentaiton for Grant_type was missing .
1. goto se24 and look for class ZCL_OA2C_SPECIFICS_ZGOOGLE (reference blog site given above)
2. THen navigate to methods Tab search for method IF_OA2C_SPECIFICS~GET_AC_AT_REQU_PARAM_NAMES
3. Redifine the method as below
CALL METHOD SUPER->IF_OA2C_SPECIFICS~GET_AC_AT_REQU_PARAM_NAMES
IMPORTING
E_GRANT_TYPE = E_GRANT_TYPE
E_GRANT_TYPE_VALUE = E_GRANT_TYPE_VALUE
E_CODE = E_CODE
E_CLIENT_ID = E_CLIENT_ID
E_CLIENT_SECRET = E_CLIENT_SECRET
E_REDIRECT_URI = E_REDIRECT_URI.
Finally solved !!!! 🙂 cheers
Regards
Karthik
01-17-2015 9:44 PM
Hi,
few lines above the first red line. Unable to find an entry in RSECTAB. Based on that brief part of log I am guessing that it fails to retrieve an access token that needs to be sent to a server. Have you requested it (relevant SAP documentatio)? Is it stored in the system?
Cheers
01-19-2015 4:11 AM
Hi Martin,
Yes I'm requesting for the token as suggested by SAP using OA2C_GRANT i'm able to go to Google get authenticated and also I'm getting the consent screen.
i.e I'm able to get the authorization code from google back to my AS ABAP but the codeflow fails when my AS ABAP tries to request for tokens. Then i get the above error.
Please SUggest.
Regards
Karthik
01-19-2015 4:46 AM
Hi,
please check in transaction SECSTORE if the record is actually stored in ABAP AS. If no then you will have to debug why it's not getting stored. If not then reading is the problem. Have you checked authorization trace if something is there.
Cheers
01-19-2015 6:32 AM
Hi Martin,
I checked the error it is a client issue. The error shows dat it is searching in client 000 instead of 001.
I have done the configuration of oauth again in client 000 then that stage has gone thourgh.
BUt now I'm facing the problem it says "missing grant_type" parameter when requesting for token froom google.
Kindly help .
Regards
Karthik
01-19-2015 6:42 AM
01-19-2015 10:14 AM
Hi,
Even i'm not able to understand why the server is not able to pass the required parameter.
I'm trying to upgrade the existing NWW 7.4 sp08 to NW 7.4 sp09. Hope it may help.
If you have any further suggestions kinldy reply.
Regards
Karthik
01-21-2015 4:26 AM
Hi,
I was able to finally solve the issue that is no Upgrade issue.
We have to change in the BADI class Implementation
I have followed the Following blog (http://wiki.scn.sap.com/wiki/display/Security/Access+Google+APIs+using+the+OAuth+2.0+Client+API)
But in that the particular implmentaiton for Grant_type was missing .
1. goto se24 and look for class ZCL_OA2C_SPECIFICS_ZGOOGLE (reference blog site given above)
2. THen navigate to methods Tab search for method IF_OA2C_SPECIFICS~GET_AC_AT_REQU_PARAM_NAMES
3. Redifine the method as below
CALL METHOD SUPER->IF_OA2C_SPECIFICS~GET_AC_AT_REQU_PARAM_NAMES
IMPORTING
E_GRANT_TYPE = E_GRANT_TYPE
E_GRANT_TYPE_VALUE = E_GRANT_TYPE_VALUE
E_CODE = E_CODE
E_CLIENT_ID = E_CLIENT_ID
E_CLIENT_SECRET = E_CLIENT_SECRET
E_REDIRECT_URI = E_REDIRECT_URI.
Finally solved !!!! 🙂 cheers
Regards
Karthik
05-31-2016 3:05 PM
Hi Karthik,
thanks for sharing your solution. We're working with the same example, but ...
How did you manage that the redirect endpoint from Google back to your AS ABAP application (SICF endpoint) needs to be reachable from internet ? Is our WebAS http server fully reachable from internet ?
Thanks,
Matthias