Skip to content

Commit

Permalink
chore: update token endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
borisrizov-zf committed Feb 20, 2024
1 parent 7aceb09 commit 754ac68
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.requestMatchers(new AntPathRequestMatcher("/docs/api-docs/**")).permitAll()
.requestMatchers(new AntPathRequestMatcher("/ui/swagger-ui/**")).permitAll()
.requestMatchers(new AntPathRequestMatcher("/actuator/health/**")).permitAll()
.requestMatchers(new AntPathRequestMatcher("/token", POST.name())).permitAll()
.requestMatchers(new AntPathRequestMatcher("/api/token", POST.name())).permitAll()
.requestMatchers(new AntPathRequestMatcher("/actuator/loggers/**")).hasRole(ApplicationRole.ROLE_MANAGE_APP)

//did document resolve APIs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class SecureTokenController {
private final WalletRepository walletRepo;

@SneakyThrows
@PostMapping(path = "/token", consumes = { MediaType.APPLICATION_JSON_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE })
@PostMapping(path = "/api/token", consumes = { MediaType.APPLICATION_JSON_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE })
@SecureTokenControllerApiDoc.PostSecureTokenDoc
public ResponseEntity<StsTokenResponse> token(
@Valid @RequestBody SecureTokenRequest secureTokenRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void token() {
headers.put(HttpHeaders.CONTENT_TYPE, List.of(MediaType.APPLICATION_JSON_VALUE));
HttpEntity<String> entity = new HttpEntity<>(requestBody, headers);
ResponseEntity<Map<String, Object>> response = testTemplate.exchange(
"/token",
"/api/token",
HttpMethod.POST,
entity,
new ParameterizedTypeReference<>() {
Expand Down

0 comments on commit 754ac68

Please sign in to comment.