diff --git a/projects/arns-and-delius/src/dev/resources/simulations/__files/hmpps-auth-token-body.json b/projects/arns-and-delius/src/dev/resources/simulations/__files/hmpps-auth-token-body.json index 77f7def055..672e3bdd89 100644 --- a/projects/arns-and-delius/src/dev/resources/simulations/__files/hmpps-auth-token-body.json +++ b/projects/arns-and-delius/src/dev/resources/simulations/__files/hmpps-auth-token-body.json @@ -1,5 +1,5 @@ { - "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJwcm9iYXRpb24taW50ZWdyYXRpb24tZGV2IiwiZ3JhbnRfdHlwZSI6ImNsaWVudF9jcmVkZW50aWFscyIsInVzZXJfbmFtZSI6InByb2JhdGlvbi1pbnRlZ3JhdGlvbi1kZXYiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXSwiYXV0aF9zb3VyY2UiOiJub25lIiwiaXNzIjoiaHR0cHM6Ly9zaWduLWluLWRldi5obXBwcy5zZXJ2aWNlLmp1c3RpY2UuZ292LnVrL2F1dGgvaXNzdWVyIiwiZXhwIjo5OTk5OTk5OTk5LCJhdXRob3JpdGllcyI6WyJST0xFX19QUk9CQVRJT05fQVBJX19BUk5TX19VU0VSX0FDQ0VTUyJdLCJqdGkiOiIyNUR1Um4xLWh5SFpld0xjZEpKeHdWTDAzS1UiLCJjbGllbnRfaWQiOiJwcm9iYXRpb24taW50ZWdyYXRpb24tZGV2IiwiaWF0IjoxNjYzNzU3MzExfQ.sVvzi-S36P6sQNQCOxKSa_MWOkBhH89t9d3M6DVb3qAY3RumqAzokORnwtUSWhY0OtupNKPhX3g_5iSVwQoiqH3M1wo-XxOYNFL_k1erDgfG5VFzp85RdVxqvz-hw4GYGVE8oRyOWYOlavM_LYl-8E9Nxxq6SkBzhGHFuc8xvrI", + "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJwcm9iYXRpb24taW50ZWdyYXRpb24tZGV2IiwiZ3JhbnRfdHlwZSI6ImNsaWVudF9jcmVkZW50aWFscyIsInVzZXJfbmFtZSI6InByb2JhdGlvbi1pbnRlZ3JhdGlvbi1kZXYiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXSwiYXV0aF9zb3VyY2UiOiJub25lIiwiaXNzIjoiaHR0cHM6Ly9zaWduLWluLWRldi5obXBwcy5zZXJ2aWNlLmp1c3RpY2UuZ292LnVrL2F1dGgvaXNzdWVyIiwiZXhwIjo5OTk5OTk5OTk5LCJhdXRob3JpdGllcyI6WyJST0xFX1BST0JBVElPTl9BUElfX0FSTlNfX1VTRVJfQUNDRVNTIl0sImp0aSI6IjI1RHVSbjEtaHlIWmV3TGNkSkp4d1ZMMDNLVSIsImNsaWVudF9pZCI6InByb2JhdGlvbi1pbnRlZ3JhdGlvbi1kZXYiLCJpYXQiOjE2NjM3NTczMTF9.St9epANmAZp9ReDgdPQ4o9p1pulQNJLOV82YcJm8lESNX3JDfnIr1tEMMQ9srX6ghQvwCDTeq0dJjZ0MU1LO6OXz-e6P9yLsxU215YRRhAdOEiVUjshXLQRDf37qH5XdwSXzhlxs_0tArljKeJSHzilOZV2Ve0pVmfEpblSJkdk", "token_type": "bearer", "expires_in": 9999999999, "scope": "read write", diff --git a/projects/arns-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/controller/UserResource.kt b/projects/arns-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/controller/UserResource.kt index dd3d57a6a4..856d33fd17 100644 --- a/projects/arns-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/controller/UserResource.kt +++ b/projects/arns-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/controller/UserResource.kt @@ -13,7 +13,7 @@ import uk.gov.justice.digital.hmpps.service.UserAccessService @RestController @RequestMapping("users") class UserResource(private val uas: UserAccessService) { - @PreAuthorize("hasRole('ROLE__PROBATION_API__ARNS__USER_ACCESS')") + @PreAuthorize("hasRole('PROBATION_API__ARNS__USER_ACCESS')") @RequestMapping("access", method = [RequestMethod.GET, RequestMethod.POST]) fun userAccessCheck( @RequestParam(required = false) username: String?,