Skip to content

[REQ] Spring Server generators should allow for adding OAuth2 Preauthorize annotations based on scope #1975

Open
@mikezx6r

Description

@mikezx6r

Using OAuth JWT scopes and Spring Security's PreAuthorize annotation requires the PreAuthorize annotation to be on the same method as the Mapping related annotation.

With the current generators (Java/Kotlin), the Mapping annotation is in generated code, so manually adding the PreAuthorize annotation can't be done without modifying generated code.

It would be good if the generator had a flag for Spring Security, and would then leverage the OAuth2 security settings to add @PreAuthorize() annotations to the Controller class methods with the Mapping related annotations.

This is dependent on #392 being corrected first.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions