YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.SendspinPairings Class Reference

The credentials of the Pairing PSK flow that the server keeps: the pairing tokens the operator pasted (a token is used up by a successful pairing: its player now has a long-term PSK with this server) and the long-term PSKs of paired players, each by client_id. More...

Collaboration diagram for de.yaacc.sendspin.SendspinPairings:
Collaboration graph

Public Member Functions

 SendspinPairings (StringSetStore store)
 
synchronized boolean addToken (PairingToken token)
 Keeps the token's PSK for its player.
 
synchronized byte[] pairingPsk (String clientId)
 
synchronized void removeToken (String clientId)
 
synchronized boolean isPaired (String clientId)
 
synchronized List< String > pairedIds ()
 
synchronized boolean completePairing (String clientId, byte[] longTermPsk)
 
synchronized void unpair (String clientId)
 
synchronized ServerHandshake.PskChoice pskFor (String clientId)
 

Detailed Description

The credentials of the Pairing PSK flow that the server keeps: the pairing tokens the operator pasted (a token is used up by a successful pairing: its player now has a long-term PSK with this server) and the long-term PSKs of paired players, each by client_id.

Both are credentials: they are never logged. They are kept in the app's private preferences (backup is off), like the server's identity key; wrapping them with a key of the Android Keystore is still to do (spec, task 3.5). Pure.

Member Function Documentation

◆ addToken()

synchronized boolean de.yaacc.sendspin.SendspinPairings.addToken ( PairingToken token)

Keeps the token's PSK for its player.

Returns
false if the list of tokens is full

Referenced by de.yaacc.sendspin.SendspinPolicy.addDeviceToken(), de.yaacc.sendspin.SendspinPolicy.addToken(), and de.yaacc.sendspin.SendspinPolicy.pairWithToken().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ completePairing()

synchronized boolean de.yaacc.sendspin.SendspinPairings.completePairing ( String clientId,
byte[] longTermPsk )
Returns
false if the PSK is not fit to be kept as a long-term PSK, or there is no room for another player

Referenced by de.yaacc.sendspin.SendspinPolicy.completePairing().

Here is the caller graph for this function:

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