The custom scope validator extends the default JDBC scope validator to override its default behaviour of terminating the authentication flow if any unauthorized scopes were requested. This extended scope validator allows the authentication flow to complete for any scope request while dropping the scopes which are not authorized for the user based on roles assigned.
Steps to deploy
- Build the project using maven
mvn clean install
- Copy the binary file from
target
directory into<IS_HOME>/repository/components/dropins
directory - Add folowing config to the deployment.toml file.
[[oauth.custom_scope_validator]]
class = "org.wso2.custom.scope.validator.CustomScopeValidator"
- Restart WSO2 IS
- Select
Custom scope validator
as the Scope Validator inInbound Authentication Configuration
of Service provider configuration as example below.