YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.hub.ServerPolicy Interface Reference

What the server knows about the players it has met: which PSK to reference for a client (the long-term PSK of a paired client, else the Sentinel) and which unpaired clients its operator approved. More...

Inheritance diagram for de.yaacc.sendspin.hub.ServerPolicy:
Inheritance graph
Collaboration diagram for de.yaacc.sendspin.hub.ServerPolicy:
Collaboration graph

Classes

class  InMemory
 A policy that keeps its approvals in memory only (tests, and the start of the proof of concept). More...
 

Public Member Functions

ServerHandshake.PskChoice pskFor (String clientId)
 The PSK to reference for this player: its Pairing PSK if the operator pasted a token (the operator means to pair), else its long-term PSK if it is paired, else the Sentinel.
 
byte[] pairingPsk (String clientId)
 The Pairing PSK from a token the operator pasted for this player, or null.
 
boolean isPaired (String clientId)
 
boolean completePairing (String clientId, byte[] longTermPsk)
 Records a pairing the player has just finished: stores its new long-term PSK, drops the token and the approval (spec: an approval is discarded on a successful pairing).
 
void unpair (String clientId)
 Forgets the pairing and any token of this player.
 
boolean isApproved (String clientId)
 
void approve (String clientId)
 
void revoke (String clientId)
 

Detailed Description

What the server knows about the players it has met: which PSK to reference for a client (the long-term PSK of a paired client, else the Sentinel) and which unpaired clients its operator approved.

A player that is neither paired nor approved is never given the 'playback' activity or a role (spec, "Unpaired Access").

Member Function Documentation

◆ completePairing()

boolean de.yaacc.sendspin.hub.ServerPolicy.completePairing ( String clientId,
byte[] longTermPsk )

Records a pairing the player has just finished: stores its new long-term PSK, drops the token and the approval (spec: an approval is discarded on a successful pairing).

Returns
false if the PSK is not fit to keep (the Sentinel, the pairing PSK, a wrong length) or there is no room

Implemented in de.yaacc.sendspin.hub.ServerPolicy.InMemory, and de.yaacc.sendspin.SendspinPolicy.

◆ pairingPsk()

byte[] de.yaacc.sendspin.hub.ServerPolicy.pairingPsk ( String clientId)

The Pairing PSK from a token the operator pasted for this player, or null.

Implemented in de.yaacc.sendspin.hub.ServerPolicy.InMemory, and de.yaacc.sendspin.SendspinPolicy.

◆ pskFor()

ServerHandshake.PskChoice de.yaacc.sendspin.hub.ServerPolicy.pskFor ( String clientId)

The PSK to reference for this player: its Pairing PSK if the operator pasted a token (the operator means to pair), else its long-term PSK if it is paired, else the Sentinel.

Implemented in de.yaacc.sendspin.hub.ServerPolicy.InMemory, and de.yaacc.sendspin.SendspinPolicy.

◆ unpair()

void de.yaacc.sendspin.hub.ServerPolicy.unpair ( String clientId)

Forgets the pairing and any token of this player.

Implemented in de.yaacc.sendspin.hub.ServerPolicy.InMemory, and de.yaacc.sendspin.SendspinPolicy.


The documentation for this interface was generated from the following file: