Created
September 11, 2023 20:32
-
-
Save jasondlee/c3e0e1deeff54d7c12a3139adbf80bf6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@Alternative | |
@Priority(Interceptor.Priority.LIBRARY_BEFORE) | |
@ApplicationScoped | |
class DisabledAuthController : AuthorizationController() { | |
@ConfigProperty(name = "myapp.disable.authorization") | |
var disableAuthorization = false | |
override fun isAuthorizationEnabled(): Boolean { | |
return !disableAuthorization | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment