Skip to content

Commit

Permalink
fix token validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ph1l1pF committed Sep 7, 2023
1 parent 74fa17d commit 616c9bd
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace Versteigerungs_App.Controllers
[Route("api/auction")]
[ApiController]
[Authorize]
[RequiredScope("unrestricted")]
public class AuctionController : ControllerBase
{
private readonly IAuctionService _auctionService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace Versteigerungs_App.Controllers
[Route("api/bid")]
[ApiController]
[Authorize]
[RequiredScope("unrestricted")]
public class BiddingController : ControllerBase
{
private readonly IBiddingService _biddingService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace DeviceAuctionAPI.Controllers;
[Route("api/device-groups")]
[ApiController]
[Authorize]
[RequiredScope("unrestricted")]
public class DeviceGroupsController : ControllerBase
{
private readonly IDevicesRepository _devicesRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace Versteigerungs_App.Controllers
[Route("api/device-groups/{groupId}/devices")]
[ApiController]
[Authorize]
[RequiredScope("unrestricted")]
public class DevicesController : ControllerBase
{
private readonly IDeviceService _deviceService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"Domain": "versteigerungen.onmicrosoft.com",
"TenantId": "393f7f62-ffae-4740-b443-bd04273d7320",
"SignedOutCallbackPath": "/signout/B2C_1_flow1",
"SignUpSignInPolicyId": "B2C_1_flow1"
"SignUpSignInPolicyId": "B2C_1_flow1",
"AllowWebApiToBeAuthorizedByACL" : true
}
}
2 changes: 1 addition & 1 deletion frontend/components/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ instance.interceptors.request.use(async (config) => {
});

if (accessTokenResponse) {
const accessToken = accessTokenResponse.accessToken;
const accessToken = accessTokenResponse.idToken;
if (config.headers && accessToken) {
config.headers['Authorization'] = 'Bearer ' + accessToken;
}
Expand Down

0 comments on commit 616c9bd

Please sign in to comment.