Class InviteToken
java.lang.Object
lol.trq.alts.vault.InviteToken
The token a joiner gives the owner (AVP SPEC 11.3): the joiner's two public keys, its home host (key and
locator), and the home host's signed acceptance to carry the repository for that member. The joiner gets
one from
SharedVault.prepareJoin(VaultHost, VaultIdentity, RepoLocator); the owner passes it to SharedVault.invite(InviteToken),
which verifies the acceptance and wraps the data key to exactly this token's key, never to one a host
served.
It holds no secret: its text() is meant to be pasted to the owner. An owner who wants to be sure
the token came from the person they invite compares fingerprint() with the one that person's
device shows (VaultIdentity.fingerprint()).
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhetherois a token with the same text.When the home host's acceptance expires; the owner must invite before then.The joiner's key fingerprint (SPEC 3.2),xxxx-xxxx-xxxx-xxxx, to compare out of band.inthashCode()Hashes whatequals(Object)compares.The key of the joiner's home host, base64.Where the joiner's home host is reached.memberId()The joiner's member id: its Ed25519 public key, base64.static InviteTokenReads an invite token from pasted text.text()The token text to give the owner.toString()The joiner's fingerprint and home host.
-
Method Details
-
parse
Reads an invite token from pasted text. Whitespace anywhere in the text is ignored.- Parameters:
text- the pasted text- Returns:
- the token
- Throws:
AltsException- of kindINVALID_INPUTif the text is not a version 2 invite token; whether its acceptance verifies is decided bySharedVault.invite(InviteToken)- Since:
- 1.0.0
-
text
-
memberId
The joiner's member id: its Ed25519 public key, base64.- Returns:
- the member id
- Since:
- 1.0.0
-
fingerprint
The joiner's key fingerprint (SPEC 3.2),xxxx-xxxx-xxxx-xxxx, to compare out of band.- Returns:
- the fingerprint
- Since:
- 1.0.0
-
homeHostKey
The key of the joiner's home host, base64.- Returns:
- the host key
- Since:
- 1.0.0
-
homeHostLocator
Where the joiner's home host is reached.- Returns:
- the host locator
- Since:
- 1.0.0
-
expiresAt
When the home host's acceptance expires; the owner must invite before then.- Returns:
- the expiry
- Since:
- 1.0.0
-
equals
-
hashCode
public int hashCode()Hashes whatequals(Object)compares. -
toString
-