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

The credentials of this app as a Sendspin client (the controller): the one Pairing PSK behind the token it shows (made when the user asks for the token, used up by the pairing it leads to) and the long-term PSKs of the servers it is paired with, by the id of the server, at most MAX_RECORDS (the oldest is dropped for a new one; the specification asks for room for at least five). More...

Inheritance diagram for de.yaacc.sendspin.SendspinClientPairings:
Inheritance graph
Collaboration diagram for de.yaacc.sendspin.SendspinClientPairings:
Collaboration graph

Public Member Functions

 SendspinClientPairings (StringSetStore store, SecureRandom random)
 
synchronized boolean holdsPairingPsk ()
 
synchronized String token (Identity identity)
 The token of this client for the user to give to a server; makes the Pairing PSK if there is none yet.
 
synchronized void withdrawToken ()
 Drops the Pairing PSK: the token that was shown no longer works.
 
synchronized boolean completePairing (String serverId, byte[] longTermPsk)
 Keeps the long-term PSK of a server and uses up the Pairing PSK.
 
synchronized boolean isPairedWith (String serverId)
 
synchronized List< String > pairedServerIds ()
 
synchronized void unpair (String serverId)
 The server unpaired this client: its long-term record is forgotten.
 
synchronized ClientHandshake.Held find (String pskId, SendspinPsk.Category category)
 
- Public Member Functions inherited from de.yaacc.sendspin.client.ClientCredentials
- Public Member Functions inherited from de.yaacc.sendspin.session.ClientHandshake.PskLookup

Static Public Attributes

static final int MAX_RECORDS = 8
 

Detailed Description

The credentials of this app as a Sendspin client (the controller): the one Pairing PSK behind the token it shows (made when the user asks for the token, used up by the pairing it leads to) and the long-term PSKs of the servers it is paired with, by the id of the server, at most MAX_RECORDS (the oldest is dropped for a new one; the specification asks for room for at least five).

A record is <sequence>:<server id>:<PSK>. Credentials: never logged; kept in the app's private preferences like the other keys (the Keystore wrapping is still to do). Pure.

Member Function Documentation

◆ completePairing()

synchronized boolean de.yaacc.sendspin.SendspinClientPairings.completePairing ( String serverId,
byte[] longTermPsk )

Keeps the long-term PSK of a server and uses up the Pairing PSK.

Returns
false if the PSK is not fit to be kept (the Sentinel, or the Pairing PSK itself)

Implements de.yaacc.sendspin.client.ClientCredentials.

Here is the call graph for this function:

◆ find()

synchronized ClientHandshake.Held de.yaacc.sendspin.SendspinClientPairings.find ( String pskId,
SendspinPsk.Category category )
Returns
the PSK, or null if the client holds none with this id under this category (then the Sentinel is used)

Implements de.yaacc.sendspin.session.ClientHandshake.PskLookup.

Here is the call graph for this function:

◆ holdsPairingPsk()

synchronized boolean de.yaacc.sendspin.SendspinClientPairings.holdsPairingPsk ( )
Returns
true if a Pairing PSK is held (the user asked for a token), so that a pairing activation can be answered

Implements de.yaacc.sendspin.client.ClientCredentials.

◆ unpair()

synchronized void de.yaacc.sendspin.SendspinClientPairings.unpair ( String serverId)

The server unpaired this client: its long-term record is forgotten.

Implements de.yaacc.sendspin.client.ClientCredentials.

Referenced by de.yaacc.sendspin.SendspinHub.unpairServer().

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

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