Class AuthUtils
Static utility methods for working with the authorization component.
Inheritance
Namespace: Eco.Gameplay.Utils
Assembly: Eco.Gameplay.dll
Syntax
public static class AuthUtils : Object
Methods
CheckBankAccountAndToggle(IAlias, OnOffComponent, CreditComponent, Action)
Checks if the player has the required permissions to use the bank account. If not disable the WorldObject instance via its OnOffComponent.
Declaration
public static void CheckBankAccountAndToggle(IAlias owner, OnOffComponent onOff, CreditComponent credit, Action handleCheckFail = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IAlias | owner | Owner(s) to check for BankAccount access/ownership. |
| OnOffComponent | onOff | OnOffComponent instance to toggle off when authorization fails. |
| CreditComponent | credit | CreditComponent instance to operate on as our bank account instance. |
| System.Action | handleCheckFail | Optional Action for running custom logic when the auth check fails. |
CheckBankAccountAndToggle(IAlias, OnOffComponent, BankAccount, Action)
Checks if the player has the required permissions to use the bank account. If not disable the WorldObject instance via its OnOffComponent.
Declaration
public static void CheckBankAccountAndToggle(IAlias owner, OnOffComponent onOff, BankAccount account, Action handleCheckFail = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IAlias | owner | Owner(s) to check for BankAccount access/ownership. |
| OnOffComponent | onOff | OnOffComponent instance to toggle off when authorization fails. |
| BankAccount | account | The BankAccount to verify owner acesss. |
| System.Action | handleCheckFail | Optional Action for running custom logic when the auth check fails. |