Mirror::Authenticators::BasicAuthenticator
Inherits from NetworkAuthenticator, MonoBehaviour
Public Classes
Name | |
---|---|
struct | AuthRequestMessage |
struct | AuthResponseMessage |
Public Functions
Name | |
---|---|
virtual override void | OnStartServer() Called on server from StartServer to initialize the Authenticator |
virtual override void | OnServerAuthenticate(NetworkConnection conn) Called on server from OnServerAuthenticateInternal when a client needs to authenticate |
void | OnAuthRequestMessage(NetworkConnection conn, AuthRequestMessage msg) Called on server when the client's AuthRequestMessage arrives |
virtual override void | OnStartClient() Called on client from StartClient to initialize the Authenticator |
virtual override void | OnClientAuthenticate(NetworkConnection conn) Called on client from OnClientAuthenticateInternal when a client needs to authenticate |
void | OnAuthResponseMessage(NetworkConnection conn, AuthResponseMessage msg) Called on client when the server's AuthResponseMessage arrives |
Public Attributes
Name | |
---|---|
string | username |
string | password |
Additional inherited members
Protected Functions inherited from NetworkAuthenticator
Name | |
---|---|
void | ServerAccept(NetworkConnection conn) |
void | ServerReject(NetworkConnection conn) |
void | ClientAccept(NetworkConnection conn) |
void | ClientReject(NetworkConnection conn) |
Public Attributes inherited from NetworkAuthenticator
Name | |
---|---|
UnityEventNetworkConnection | OnServerAuthenticated Notify subscribers on the server when a client is authenticated |
UnityEventNetworkConnection | OnClientAuthenticated Notify subscribers on the client when the client is authenticated |
Public Functions Documentation
function OnStartServer
inline virtual override void OnStartServer()
Called on server from StartServer to initialize the Authenticator
Reimplements: Mirror::NetworkAuthenticator::OnStartServer
Server message handlers should be registered in this method.
function OnServerAuthenticate
inline virtual override void OnServerAuthenticate(
NetworkConnection conn
)
Called on server from OnServerAuthenticateInternal when a client needs to authenticate
Parameters:
- conn Connection to client.
Reimplements: Mirror::NetworkAuthenticator::OnServerAuthenticate
function OnAuthRequestMessage
inline void OnAuthRequestMessage(
NetworkConnection conn,
AuthRequestMessage msg
)
Called on server when the client's AuthRequestMessage arrives
Parameters:
- conn Connection to client.
- msg The message payload
function OnStartClient
inline virtual override void OnStartClient()
Called on client from StartClient to initialize the Authenticator
Reimplements: Mirror::NetworkAuthenticator::OnStartClient
Client message handlers should be registered in this method.
function OnClientAuthenticate
inline virtual override void OnClientAuthenticate(
NetworkConnection conn
)
Called on client from OnClientAuthenticateInternal when a client needs to authenticate
Parameters:
- conn Connection of the client.
Reimplements: Mirror::NetworkAuthenticator::OnClientAuthenticate
function OnAuthResponseMessage
inline void OnAuthResponseMessage(
NetworkConnection conn,
AuthResponseMessage msg
)
Called on client when the server's AuthResponseMessage arrives
Parameters:
- conn Connection to client.
- msg The message payload
Public Attributes Documentation
variable username
string username;
variable password
string password;
Updated on 18 January 2021 at 09:53:55 UTC