Skip to main content
14-Alexandrite
Jul 17, 2024 1:06 PM UTC
Question

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

 

 

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

 

 

 

@HelesicPetr 

4 replies

Catalina
Community Moderator
Jul 17, 2024 2:12 PM UTC

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

Translate
Catalina | PTC Community Moderator
14-Alexandrite
Jul 18, 2024 7:25 AM UTC

if Windchill SSO is configured as below.

 

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

Translate
HelesicPetr
22-Sapphire II
Jul 18, 2024 7:36 AM UTC

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 

Translate
14-Alexandrite
Jul 26, 2024 8:14 AM UTC

CSRF and JWT Tokens are different than Windchill Access token.

For the reference there is an article from PTC.

https://support.ptc.com/help/windchill_rest_services/r2.2/en/index.html#page/windchill_rest_services/oauth_for_wrs.html

but this architecture is a bit different from the once which is configured.

Translate