<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is there any API to get the Logged-in Users' Access-Token as shown as a sample. in Windchill Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-there-any-API-to-get-the-Logged-in-Users-Access-Token-as/m-p/961974#M8370</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/620967"&gt;@Manoj_Dokku4&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know only api to get CSRFToken&lt;/P&gt;
&lt;PRE class="curl microlight"&gt;&lt;CODE class="language-bash"&gt;&lt;SPAN&gt;curl -X &lt;/SPAN&gt;&lt;SPAN&gt;'GET'&lt;/SPAN&gt;&lt;SPAN&gt; \
&lt;/SPAN&gt;  &lt;SPAN&gt;'https://server.com:443/Windchill/servlet/odata/v3/PTC/GetCSRFToken()'&lt;/SPAN&gt;&lt;SPAN&gt; \
&lt;/SPAN&gt;&lt;SPAN&gt;  -H &lt;/SPAN&gt;&lt;SPAN&gt;'accept: application/json'&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;also you can check if the CSRF is valid by java script&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;var CSRFProtector = Java.type('com.ptc.core.appsec.CSRFProtector');
CSRFProtector.checkNonce(data.getHttpRequest());&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS&amp;gt; i guess that access token is different token that is used by &lt;SPAN&gt;Shibbleth and I guess that this information could be in the HTTP request as a parameter&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PetH&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2024 07:38:05 GMT</pubDate>
    <dc:creator>HelesicPetr</dc:creator>
    <dc:date>2024-07-18T07:38:05Z</dc:date>
    <item>
      <title>Is there any API to get the Logged-in Users' Access-Token as shown as a sample.</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-there-any-API-to-get-the-Logged-in-Users-Access-Token-as/m-p/961819#M8364</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
"access_token":"RsT5OjbzRn430zqMLgV3Ia",
"expires_in":3600
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/241117"&gt;@HelesicPetr&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 13:06:23 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-there-any-API-to-get-the-Logged-in-Users-Access-Token-as/m-p/961819#M8364</guid>
      <dc:creator>Manoj_Dokku4</dc:creator>
      <dc:date>2024-07-17T13:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any API to get the Logged-in Users' Access-Token as shown as a sample.</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-there-any-API-to-get-the-Logged-in-Users-Access-Token-as/m-p/961838#M8365</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/620967"&gt;@Manoj_Dokku4&lt;/a&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for your question!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I’d like to recommend to bring more details and context to your initial inquiry.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It also helps to have screenshot(s) to better understand what you are trying to do in your process.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This will increase your chances to receive meaningful help from other Community members.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Catalina&lt;/P&gt;
&lt;P&gt;Community Moderator&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 14:12:15 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-there-any-API-to-get-the-Logged-in-Users-Access-Token-as/m-p/961838#M8365</guid>
      <dc:creator>Catalina</dc:creator>
      <dc:date>2024-07-17T14:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any API to get the Logged-in Users' Access-Token as shown as a sample.</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-there-any-API-to-get-the-Logged-in-Users-Access-Token-as/m-p/961967#M8368</link>
      <description>&lt;P&gt;if Windchill SSO is configured as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Windchill(Shibbleth) &amp;lt;-&amp;gt; PingFederate(SAM,OATH2)&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 07:25:37 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-there-any-API-to-get-the-Logged-in-Users-Access-Token-as/m-p/961967#M8368</guid>
      <dc:creator>Manoj_Dokku4</dc:creator>
      <dc:date>2024-07-18T07:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any API to get the Logged-in Users' Access-Token as shown as a sample.</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-there-any-API-to-get-the-Logged-in-Users-Access-Token-as/m-p/961974#M8370</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/620967"&gt;@Manoj_Dokku4&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know only api to get CSRFToken&lt;/P&gt;
&lt;PRE class="curl microlight"&gt;&lt;CODE class="language-bash"&gt;&lt;SPAN&gt;curl -X &lt;/SPAN&gt;&lt;SPAN&gt;'GET'&lt;/SPAN&gt;&lt;SPAN&gt; \
&lt;/SPAN&gt;  &lt;SPAN&gt;'https://server.com:443/Windchill/servlet/odata/v3/PTC/GetCSRFToken()'&lt;/SPAN&gt;&lt;SPAN&gt; \
&lt;/SPAN&gt;&lt;SPAN&gt;  -H &lt;/SPAN&gt;&lt;SPAN&gt;'accept: application/json'&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;also you can check if the CSRF is valid by java script&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;var CSRFProtector = Java.type('com.ptc.core.appsec.CSRFProtector');
CSRFProtector.checkNonce(data.getHttpRequest());&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS&amp;gt; i guess that access token is different token that is used by &lt;SPAN&gt;Shibbleth and I guess that this information could be in the HTTP request as a parameter&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PetH&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 07:38:05 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-there-any-API-to-get-the-Logged-in-Users-Access-Token-as/m-p/961974#M8370</guid>
      <dc:creator>HelesicPetr</dc:creator>
      <dc:date>2024-07-18T07:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any API to get the Logged-in Users' Access-Token as shown as a sample.</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-there-any-API-to-get-the-Logged-in-Users-Access-Token-as/m-p/963525#M8442</link>
      <description>&lt;P&gt;CSRF and JWT Tokens are different than Windchill Access token.&lt;/P&gt;&lt;P&gt;For the reference there is an article from PTC.&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.ptc.com/help/windchill_rest_services/r2.2/en/index.html#page/windchill_rest_services/oauth_for_wrs.html" target="_blank"&gt;https://support.ptc.com/help/windchill_rest_services/r2.2/en/index.html#page/windchill_rest_services/oauth_for_wrs.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;but this architecture is a bit different from the once which is configured.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 08:14:15 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Is-there-any-API-to-get-the-Logged-in-Users-Access-Token-as/m-p/963525#M8442</guid>
      <dc:creator>Manoj_Dokku4</dc:creator>
      <dc:date>2024-07-26T08:14:15Z</dc:date>
    </item>
  </channel>
</rss>

