Add denyAll method in AuthorizePayloadsSpec.Access
See gh-7437 Co-authored-by: Eddú Meléndez <eddu.melendez@gmail.com>
This commit is contained in:
@@ -104,6 +104,7 @@ import java.util.List;
|
||||
* }
|
||||
* </pre>
|
||||
* @author Rob Winch
|
||||
* @author Jesús Ascama Arias
|
||||
* @since 5.2
|
||||
*/
|
||||
public class RSocketSecurity {
|
||||
@@ -325,6 +326,11 @@ public class RSocketSecurity {
|
||||
AuthorizePayloadsSpec.this.authzBuilder.add(new PayloadExchangeMatcherEntry<>(this.matcher, authorization));
|
||||
return AuthorizePayloadsSpec.this;
|
||||
}
|
||||
|
||||
public AuthorizePayloadsSpec denyAll() {
|
||||
return access((a, ctx) -> Mono
|
||||
.just(new AuthorizationDecision(false)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user