<?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 Integration testing - How do I deal with authentication? in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Integration-testing-How-do-I-deal-with-authentication/m-p/75797#M47303</link>
    <description>&lt;DIV class="_3xX726aBn29LDbsDtzr_6E _1Ap4F5maDtT1E1YuCiaO0r D3IL3FD0RFy_mkKLPwL4"&gt;&lt;DIV class="_292iotee39Lmt0MkQZ2hPV RichTextJSON-root"&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I am trying to setup some integration tests for a web API. Some of the routes in the controller I am interested in use the [Authorize] attribute, backed by JWT authentication using Identity Server 4, to prevent unauthorized from accessing certain resources.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I'd like to "disable" authorization for testing purposes: replacing Identity Server with a "fake" authorizer that always gives green light to all requests.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I am using TestServer to run the API I want to test in memory and I'd like to use ConfigureTestServices to override the authorisation method, but I can't find any easy way to stub/mock it.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Does anyone have any relevant experience with a similar problem?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 14 Apr 2021 19:28:09 GMT</pubDate>
    <dc:creator>TrishaSeliya</dc:creator>
    <dc:date>2021-04-14T19:28:09Z</dc:date>
    <item>
      <title>Integration testing - How do I deal with authentication?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Integration-testing-How-do-I-deal-with-authentication/m-p/75797#M47303</link>
      <description>&lt;DIV class="_3xX726aBn29LDbsDtzr_6E _1Ap4F5maDtT1E1YuCiaO0r D3IL3FD0RFy_mkKLPwL4"&gt;&lt;DIV class="_292iotee39Lmt0MkQZ2hPV RichTextJSON-root"&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I am trying to setup some integration tests for a web API. Some of the routes in the controller I am interested in use the [Authorize] attribute, backed by JWT authentication using Identity Server 4, to prevent unauthorized from accessing certain resources.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I'd like to "disable" authorization for testing purposes: replacing Identity Server with a "fake" authorizer that always gives green light to all requests.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I am using TestServer to run the API I want to test in memory and I'd like to use ConfigureTestServices to override the authorisation method, but I can't find any easy way to stub/mock it.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Does anyone have any relevant experience with a similar problem?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Apr 2021 19:28:09 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Integration-testing-How-do-I-deal-with-authentication/m-p/75797#M47303</guid>
      <dc:creator>TrishaSeliya</dc:creator>
      <dc:date>2021-04-14T19:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Integration testing - How do I deal with authentication?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Integration-testing-How-do-I-deal-with-authentication/m-p/76458#M47764</link>
      <description>&lt;P&gt;&lt;EM&gt;Integration Testing&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;is defined as a type of testing where software modules are integrated logically and tested as a group&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 16:06:57 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Integration-testing-How-do-I-deal-with-authentication/m-p/76458#M47764</guid>
      <dc:creator>jamesphill</dc:creator>
      <dc:date>2021-05-25T16:06:57Z</dc:date>
    </item>
  </channel>
</rss>

