Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AsyncSecurityPolicy.checkAuthorizationAsync public. #10836

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void testFailedFuturesPropagateOriginalException() throws Exception {
ServerSecurityPolicy.newBuilder()
.servicePolicy("foo", new AsyncSecurityPolicy() {
@Override
ListenableFuture<Status> checkAuthorizationAsync(int uid) {
public ListenableFuture<Status> checkAuthorizationAsync(int uid) {
return Futures.immediateFailedFuture(originalException);
}
})
Expand All @@ -207,7 +207,7 @@ public void testFailedFuturesAreNotCachedPermanently() throws Exception {
ServerSecurityPolicy.newBuilder()
.servicePolicy("foo", new AsyncSecurityPolicy() {
@Override
ListenableFuture<Status> checkAuthorizationAsync(int uid) {
public ListenableFuture<Status> checkAuthorizationAsync(int uid) {
if (firstAttempt.getAndSet(false)) {
return Futures.immediateFailedFuture(new IllegalStateException());
}
Expand All @@ -229,7 +229,7 @@ public void testCancelledFuturesAreNotCachedPermanently() throws Exception {
ServerSecurityPolicy.newBuilder()
.servicePolicy("foo", new AsyncSecurityPolicy() {
@Override
ListenableFuture<Status> checkAuthorizationAsync(int uid) {
public ListenableFuture<Status> checkAuthorizationAsync(int uid) {
if (firstAttempt.getAndSet(false)) {
return Futures.immediateCancelledFuture();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ public final Status checkAuthorization(int uid) {
* @return A {@link ListenableFuture} for a gRPC {@link Status} object, with OK indicating
* authorized.
*/
abstract ListenableFuture<Status> checkAuthorizationAsync(int uid);
public abstract ListenableFuture<Status> checkAuthorizationAsync(int uid);
}