Package 

Class BinderTransportSecurity


  • 
    public final class BinderTransportSecurity
    
                        

    Manages security for an Android Service hosted gRPC server.

    Attaches authorization state to a newly-created transport, and contains a ServerInterceptor which ensures calls are authorized before allowing them to proceed.

    • Method Detail

      • installAuthInterceptor

        @Internal() static void installAuthInterceptor(ServerBuilder<out Object> serverBuilder, Executor executor)

        Install a security policy on an about-to-be created server.

        Parameters:
        serverBuilder - The ServerBuilder being used to create the server.
        executor - The executor in which the authorization result will be handled.
      • attachAuthAttrs

        @Internal() static void attachAuthAttrs(Attributes.Builder builder, int remoteUid, BinderTransportSecurity.ServerPolicyChecker serverPolicyChecker)

        Attach the given security policy to the transport attributes being built. Will be used by theauth interceptor to confirm accept or reject calls.

        Parameters:
        builder - The Attributes.Builder for the transport being created.
        remoteUid - The remote UID of the transport.
        serverPolicyChecker - The policy checker for this transport.