Skip to main content

OdinToken

public class OdinToken

Class to handle ODIN tokens.

A room token is a JWT given to clients that allows them to connect to a chat room in the ODIN network.

Properties​

rawValue​

public let rawValue: String

The underlying JWT as a string.

userId​

public var userId: String

The user ID that was encoded in the token.

roomId​

public var roomId: String

The room ID that was encoded in the token.

Methods​

init(_:)​

public init(_ string: String) throws

Initializes a new token instance using a specified JWT string.