Skip to content

Instantly share code, notes, and snippets.

@larshp

larshp/ticket.abap

Last active Feb 25, 2021
Embed
What would you like to do?
METHOD zif_abapgit_exit~http_client.
DATA: lv_ticket TYPE text4096,
ls_bapiret2 TYPE bapiret2.
* Or create RFC calling function module CREATE_RFC_REENTRANCE_TICKET
CALL FUNCTION '/PLMI/EASYDMS_CREATE_SSOTICKET'
DESTINATION 'SOMETHING'
IMPORTING
ev_ticket = lv_ticket
es_return = ls_bapiret2
EXCEPTIONS
system_failure = 1
communication_failure = 2
resource_failure = 3.
IF sy-subrc = 0.
ii_client->request->set_header_field(
name = 'MYSAPSSO2'
value = CONV #( lv_ticket ) ).
ENDIF.
ENDMETHOD.
@nikhilguptaa

This comment has been minimized.

Copy link

@nikhilguptaa nikhilguptaa commented May 14, 2020

Hi @larshp I have created a Oauth Client in ABAP which retrieves bearer tokens and refresh tokens from AZURE AD. Since our Azure Devops VSTS Repos are protected we have to authenticate each connection call. Our organization don't want to create PAT to login and they want to use SSO for that. Here comes the use of Oauth client, Can you please point me where can i modify the code, so that instead of asking user id and paswword, abapGit should set the token in http_client call and directly makes call with bearer tokens. Also if bearer token fails then i should be able to use refresh_flow to get new token with refresh token.
Setting_token

@larshp

This comment has been minimized.

Copy link
Owner Author

@larshp larshp commented May 14, 2020

above code is for SAP reentrance tickets, not related to oauth, I don't have experience setting up oauth

@prasanth-pulapaka

This comment has been minimized.

Copy link

@prasanth-pulapaka prasanth-pulapaka commented Feb 25, 2021

Hi Larshp, Nikhil
I am also looking for the oath proxy authentication to connect to Azure devops git from SAP.
Can you please let me know if you have the latest http_client implementation available for this ?
@nikhil : did you set any default value to the profile parameter ?

Thanks & Regards,
Prasanth P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment