blob: 5f6b262358148135ebb8f3384518e11228acdd7d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jrt;
/**
* Request access filter is invoked before any call to {@link Method#invoke(Request)}.
* If {@link #allow(Request)} returns false, the method is not invoked, and the request is failed with error
* {@link ErrorCode#PERMISSION_DENIED}.
*
* @author bjorncs
*/
public interface RequestAccessFilter {
RequestAccessFilter ALLOW_ALL = __ -> true;
boolean allow(Request r);
}
|