cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Is there any API to get the Logged-in Users' Access-Token as shown as a sample.

Manoj_Dokku4
11-Garnet

Is there any API to get the Logged-in Users' Access-Token as shown as a sample.

 

 

{
"access_token":"RsT5OjbzRn430zqMLgV3Ia",
"expires_in":3600
}

 

 

 

@HelesicPetr 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Manoj_Dokku4 

I know only api to get CSRFToken

curl -X 'GET' \
  'https://server.com:443/Windchill/servlet/odata/v3/PTC/GetCSRFToken()' \
  -H 'accept: application/json'

also you can check if the CSRF is valid by java script

 

var CSRFProtector = Java.type('com.ptc.core.appsec.CSRFProtector');
CSRFProtector.checkNonce(data.getHttpRequest());

 

PS> i guess that access token is different token that is used by Shibbleth and I guess that this information could be in the HTTP request as a parameter

 

PetH 

View solution in original post

3 REPLIES 3

Hi @Manoj_Dokku4 

Thank you for your question!


I’d like to recommend to bring more details and context to your initial inquiry. 

It also helps to have screenshot(s) to better understand what you are trying to do in your process. 

This will increase your chances to receive meaningful help from other Community members. 

 

Thank you,

Catalina

Community Moderator

Catalina
PTC Community Moderator

if Windchill SSO is configured as below.

 

Windchill(Shibbleth) <-> PingFederate(SAM,OATH2)

Hi @Manoj_Dokku4 

I know only api to get CSRFToken

curl -X 'GET' \
  'https://server.com:443/Windchill/servlet/odata/v3/PTC/GetCSRFToken()' \
  -H 'accept: application/json'

also you can check if the CSRF is valid by java script

 

var CSRFProtector = Java.type('com.ptc.core.appsec.CSRFProtector');
CSRFProtector.checkNonce(data.getHttpRequest());

 

PS> i guess that access token is different token that is used by Shibbleth and I guess that this information could be in the HTTP request as a parameter

 

PetH 

Top Tags