Package 

Class PeerUid


  • @ExperimentalApi(value = https://github.com/grpc/grpc-java/issues/8022) 
    public final class PeerUid
    
                        

    Identifies a gRPC/binder client or server by Android/Linux UID (https://source.android.com/security/app-sandbox).

    Use REMOTE_PEER to obtain the client's PeerUid from the server's io.grpc.Context

    The actual integer uid is intentionally not exposed to prevent misuse. If you want the uid for access control, consider one of the existing SecurityPolicies instead (or propose a new one). If you want the uid to pass to some other Android API, consider one of the static wrapper methods of PeerUids instead (or propose a new one).

    • Method Summary

      Modifier and Type Method Description
      static PeerUid forCurrentProcess() Returns an identifier for the current process.
      boolean equals(Object otherObj)
      int hashCode()
      String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait