> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksserverevents/ks.reactor.server.ksserverevents.authenticatehandler.md).

# Delegate ksServerEvents.AuthenticateHandler

Namespace: [KS.Reactor.Server](/reactor/api-reference/ks.reactor.server.md)\
Assembly: KSReactor.dll

Authentication handler.

```csharp
public delegate Task<ksAuthenticationResult> ksServerEvents.AuthenticateHandler(ksIServerPlayer player, ksMultiType[] arguments, CancellationToken cancellationToken)
```

#### Parameters

`player` [ksIServerPlayer](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksiserverplayer.md)

Player to authenticate.

`arguments` ksMultiType\[]

Authentication arguments.

`cancellationToken` [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken)

Cancellation token to cancel the authentication task if a timeout is exceeded or the user disconnects.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<ksAuthenticationResult>

Authentication task. An authentication result with a non-zero status will fail authentication. A null task will fail authentication.
