You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/security/authentication/GrpcAuthenticationReader.java
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,12 +26,17 @@
26
26
27
27
importio.grpc.Metadata;
28
28
importio.grpc.ServerCall;
29
+
importio.grpc.Status;
29
30
30
31
/**
31
32
* Reads the authentication data from the given {@link ServerCall} and {@link Metadata}. The returned
32
33
* {@link Authentication} is not yet validated and needs to be passed to an {@link AuthenticationManager}.
33
34
*
34
35
* <p>
36
+
* This is similar to the {@code org.springframework.security.web.authentication.AuthenticationConverter}.
37
+
* </p>
38
+
*
39
+
* <p>
35
40
* <b>Note:</b> The authentication manager needs a corresponding {@link AuthenticationProvider} to actually verify the
36
41
* {@link Authentication}.
37
42
* </p>
@@ -47,7 +52,9 @@ public interface GrpcAuthenticationReader {
47
52
* <p>
48
53
* <b>Note:</b> Implementations are free to throw an {@link AuthenticationException} if no credentials could be
49
54
* found in the call. If an exception is thrown by an implementation then the authentication attempt should be
50
-
* considered as failed and no subsequent {@link GrpcAuthenticationReader}s should be called.
55
+
* considered as failed and no subsequent {@link GrpcAuthenticationReader}s should be called. Additionally, the call
56
+
* will fail as {@link Status#UNAUTHENTICATED}. If the call instead returns {@code null}, then the call processing
57
+
* will proceed unauthenticated.
51
58
* </p>
52
59
*
53
60
* @param call The call to get that send the request.
Copy file name to clipboardExpand all lines: grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/security/interceptors/AuthenticatingServerInterceptor.java
Copy file name to clipboardExpand all lines: grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/security/interceptors/DefaultAuthenticatingServerInterceptor.java
0 commit comments