You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 7.1 Implementando projeção de lançamento - Spring Boot 2.5.0/algamoney-api/src/main/java/com/example/algamoney/api/resource/PessoaResource.java
+5-5
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ public class PessoaResource {
39
39
privateApplicationEventPublisherpublisher;
40
40
41
41
@PostMapping
42
-
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and #oauth2.hasScope('write')")
42
+
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and hasAuthority('SCOPE_write')")
Copy file name to clipboardExpand all lines: 7.2 Profiles do Spring - Spring Boot 2.5.0/algamoney-api/src/main/java/com/example/algamoney/api/resource/PessoaResource.java
+5-5
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ public class PessoaResource {
39
39
privateApplicationEventPublisherpublisher;
40
40
41
41
@PostMapping
42
-
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and #oauth2.hasScope('write')")
42
+
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and hasAuthority('SCOPE_write')")
Copy file name to clipboardExpand all lines: 7.4 Deploy da API na nuvem - Spring Boot 2.5.0/algamoney-api/src/main/java/com/example/algamoney/api/resource/PessoaResource.java
+5-5
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ public class PessoaResource {
39
39
privateApplicationEventPublisherpublisher;
40
40
41
41
@PostMapping
42
-
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and #oauth2.hasScope('write')")
42
+
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and hasAuthority('SCOPE_write')")
Copy file name to clipboardExpand all lines: 7.5 Nome do usuário no token JWT - Spring Boot 2.5.0/algamoney-api/src/main/java/com/example/algamoney/api/resource/PessoaResource.java
+5-5
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ public class PessoaResource {
39
39
privateApplicationEventPublisherpublisher;
40
40
41
41
@PostMapping
42
-
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and #oauth2.hasScope('write')")
42
+
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and hasAuthority('SCOPE_write')")
Copy file name to clipboardExpand all lines: 7.6 Alternando OAuth 2 e Basic Security com profiles - Spring Boot 2.5.0/algamoney-api/src/main/java/com/example/algamoney/api/resource/PessoaResource.java
+5-5
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ public class PessoaResource {
39
39
privateApplicationEventPublisherpublisher;
40
40
41
41
@PostMapping
42
-
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and #oauth2.hasScope('write')")
42
+
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and hasAuthority('SCOPE_write')")
Copy file name to clipboardExpand all lines: 7.7 Desafio - Pesquisa de pessoa - Spring Boot 2.5.0/algamoney-api/src/main/java/com/example/algamoney/api/resource/PessoaResource.java
+5-5
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ public class PessoaResource {
42
42
privateApplicationEventPublisherpublisher;
43
43
44
44
@PostMapping
45
-
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and #oauth2.hasScope('write')")
45
+
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and hasAuthority('SCOPE_write')")
Copy file name to clipboardExpand all lines: 7.9 Desafio - Atualização de lançamento - Spring Boot 2.5.0/algamoney-api/src/main/java/com/example/algamoney/api/resource/PessoaResource.java
+5-5
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ public class PessoaResource {
42
42
privateApplicationEventPublisherpublisher;
43
43
44
44
@PostMapping
45
-
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and #oauth2.hasScope('write')")
45
+
@PreAuthorize("hasAuthority('ROLE_CADASTRAR_PESSOA') and hasAuthority('SCOPE_write')")
0 commit comments