Closed larshp closed 6 years ago
the following works, the ticket from CREATE_RFC_REENTRANCE_TICKET is fetched via RFC, in my test system the following RFC existed, if not just create Z fm,
METHOD zif_abapgit_exit~http_client.
DATA: lv_ticket TYPE text4096,
ls_bapiret2 TYPE bapiret2.
CALL FUNCTION '/PLMI/EASYDMS_CREATE_SSOTICKET'
DESTINATION 'FOOBAR'
IMPORTING
ev_ticket = lv_ticket
es_return = ls_bapiret2.
ii_client->request->set_header_field(
name = 'MYSAPSSO2'
value = CONV #( lv_ticket ) ).
ENDMETHOD.
If I have 2 development systems, and only want to have abapGitServer installed on a single system, this is possible, but the username and password is stored in clear text in abapGit.
Instead do something like: https://gist.github.com/larshp/30ed5bbed145c48128c9d82f9efd147f
Call an RFC on a trusted system, which gives a ticket, that can be used for http logon
abapGit hook: before calling send_receive in zcl_abapgit_http method create_by_url