Class BookieAuthZFactory

    • Field Detail

      • allowedRoles

        public java.lang.String[] allowedRoles
    • Constructor Detail

      • BookieAuthZFactory

        public BookieAuthZFactory()
    • Method Detail

      • init

        public void init​(ServerConfiguration conf)
        Description copied from interface: BookieAuthProvider.Factory
        Initialize the factory with the server configuration and protobuf message registry. Implementors must add any extension messages which contain the auth payload, so that the server can decode auth messages it receives from the client.
        Specified by:
        init in interface BookieAuthProvider.Factory
      • newProvider

        public BookieAuthProvider newProvider​(BookieConnectionPeer addr,
                                              AuthCallbacks.GenericCallback<java.lang.Void> completeCb)
        Description copied from interface: BookieAuthProvider.Factory
        Create a new instance of a bookie auth provider. Each connection should get its own instance, as they can hold connection specific state. The completeCb is used to notify the server that the authentication handshake is complete. CompleteCb should be called only once. If the authentication was successful, BKException.Code.OK should be passed as the return code. Otherwise, another error code should be passed. If authentication fails, the server will close the connection.
        Specified by:
        newProvider in interface BookieAuthProvider.Factory
        addr - an handle to the connection
        completeCb - callback to be notified when authentication is complete.