Table of Contents

Class CredentialsStore

Namespace
RustPlusApi.Fcm.Registration
Assembly
RustPlusApi.Fcm.Registration.dll

Persists Credentials to JSON (the rustplus.config.json equivalent), so they survive between the one-time registration and later RustPlusFcm runs.

public static class CredentialsStore
Inheritance
CredentialsStore
Inherited Members

Methods

Deserialize(string)

Deserializes json back into a Credentials instance.

public static Credentials Deserialize(string json)

Parameters

json string

The JSON string produced by Serialize(Credentials).

Returns

Credentials

Exceptions

InvalidOperationException

Thrown when json cannot be deserialized.

Load(string)

Reads the file at path and deserializes it into a Credentials instance.

public static Credentials Load(string path)

Parameters

path string

The file path previously written by Save(string, Credentials).

Returns

Credentials

Save(string, Credentials)

Serializes credentials and writes the result to path.

public static void Save(string path, Credentials credentials)

Parameters

path string

The file path to write to.

credentials Credentials

The credentials to persist.

Serialize(Credentials)

Serializes credentials to an indented JSON string.

public static string Serialize(Credentials credentials)

Parameters

credentials Credentials

The credentials to serialize.

Returns

string