Skip to content

Commit

Permalink
cleanup test script
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorwolf committed Jan 30, 2024
1 parent ec04758 commit e8f7d39
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions test/entra-id-saml-bearer.http
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
&assertion={{$dotenv token}}
&client_id={{$dotenv client_id}}
&client_secret={{$dotenv client_secret}}
# ABAP
# ABAP / BTP Entity ID in ApplicationIDuri
&scope={{$dotenv ApplicationIDuri}}/.default
# BTP
#&scope={{$dotenv btp_auth}}/.default
&requested_token_use=on_behalf_of
&requested_token_type=urn:ietf:params:oauth:token-type:saml2
#&requested_token_type=urn:ietf:params:oauth:token-type:saml1
Expand All @@ -36,21 +34,25 @@ GET {{$dotenv abap_server}}/sap/opu/odata/sap/epm_ref_apps_prod_man_srv/Products
Authorization: Bearer {{access_token}}

### Get SAML Metadata from SAP BTP
GET {{$dotenv btp_auth}}/saml/metadata
GET {{$dotenv ApplicationIDuri}}/saml/metadata
### Get Access Token from SAP BTP
# @name requestAccessTokenBTP
POST {{$dotenv btp_auth}}{{$dotenv btp_auth_path}}
POST {{$dotenv ApplicationIDuri}}{{$dotenv btp_auth_path}}
Authorization: Basic {{$dotenv btp_clientid}}:{{$dotenv btp_clientsecret}}
Content-Type: application/x-www-form-urlencoded

assertion={{saml_bearer_token}}
&grant_type=urn:ietf:params:oauth:grant-type:saml2-bearer
###
#@access_token_btp = {{requestAccessTokenBTP.response.body.$.access_token}}
@access_token_btp={{$dotenv token}}
@access_token_btp = {{requestAccessTokenBTP.response.body.$.access_token}}
#@access_token_btp={{$dotenv token}}
### Request Data from SAP BTP
GET {{$dotenv graph_uri}}/api/s4hc/sap.s4/A_Product
GET {{$dotenv graph_uri}}/api/{{$dotenv graph_name}}/sap.s4/A_Product
?$top=10
&$select=Product,Brand,CountryOfOrigin
&$count=true
Authorization: Bearer {{access_token_btp}}
### Read User Details based on OData Service
### https://github.com/gregorwolf/ZAPI_USER_NAME
GET {{$dotenv graph_uri}}/api/{{$dotenv graph_name}}/my.erp.usr/UserdetailsSet
Authorization: Bearer {{access_token_btp}}

0 comments on commit e8f7d39

Please sign in to comment.