-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add handling of the annotation @PermissionsAllowed on methods or class.
Signed-off-by: Pierre Adam <[email protected]>
- Loading branch information
1 parent
3f1c078
commit d7d2e08
Showing
4 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...test/java/io/quarkus/smallrye/openapi/test/jaxrs/OpenApiResourceSecuredAtClassLevel2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package io.quarkus.smallrye.openapi.test.jaxrs; | ||
|
||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Path; | ||
|
||
import org.eclipse.microprofile.openapi.annotations.servers.Server; | ||
import org.eclipse.microprofile.openapi.annotations.tags.Tag; | ||
|
||
import io.quarkus.security.PermissionsAllowed; | ||
|
||
@Path("/resource3") | ||
@Tag(name = "test") | ||
@Server(url = "serverUrl") | ||
@PermissionsAllowed("secure:read") | ||
public class OpenApiResourceSecuredAtClassLevel2 { | ||
|
||
@SuppressWarnings("unused") | ||
private ResourceBean resourceBean; | ||
|
||
@GET | ||
@Path("/test-security/classLevel-2/1") | ||
public String secureEndpoint1() { | ||
return "secret"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters