> 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/ks.reactor.ksauthenticationresult.md).

# Struct ksAuthenticationResult

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

Authentication result returned by user authentication functions. Authentication passes if [Code](#KS_Reactor_ksAuthenticationResult_Code) is zero. If there are multiple authentication functions, if any of them return a non-zero code, authentication fails.

```csharp
public struct ksAuthenticationResult
```

#### Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Constructors

### ksAuthenticationResult(uint, params ksMultiType\[]) <a href="#ks_reactor_ksauthenticationresult__ctor_system_uint32_ks_reactor_ksmultitype" id="ks_reactor_ksauthenticationresult__ctor_system_uint32_ks_reactor_ksmultitype"></a>

Constructor

```csharp
public ksAuthenticationResult(uint code, params ksMultiType[] data)
```

#### Parameters

`code` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

Custom status code. Non-zero to fail authentication.

`data` [ksMultiType](/reactor/api-reference/ks.reactor/ks.reactor.ksmultitype.md)\[]

Custom response data.

## Properties

### Code <a href="#ks_reactor_ksauthenticationresult_code" id="ks_reactor_ksauthenticationresult_code"></a>

Custom status code. Non-zero values will fail authentication. If authentication fails because the connection limit is reached, this is the connection limit.

```csharp
public uint Code { get; }
```

#### Property Value

[uint](https://learn.microsoft.com/dotnet/api/system.uint32)

### Data <a href="#ks_reactor_ksauthenticationresult_data" id="ks_reactor_ksauthenticationresult_data"></a>

Custom response data. If there are multiple authentication functions and one of them fails, this is the response data from the one that failed. If there are multiple authentication functions that return different response data and authentication passes, all the data values are appended into one array.

```csharp
public ksMultiType[] Data { get; }
```

#### Property Value

[ksMultiType](/reactor/api-reference/ks.reactor/ks.reactor.ksmultitype.md)\[]

## Methods

### ToString() <a href="#ks_reactor_ksauthenticationresult_tostring" id="ks_reactor_ksauthenticationresult_tostring"></a>

Converts the authentication result to a string.

```csharp
public override string ToString()
```

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

String representation of the authentication result.
