API reference / @jsprismarine/auth / KeyedAuthProvider
Abstract Class: KeyedAuthProvider
Defined in: KeyedAuthProvider.ts:16
What every provider that holds its own identity key shares: the key, the client data signed with it, and the random id the client picks once. A provider adds where its identity and its chain come from.
The key is per instance rather than per login. It is the identity: reusing one across two concurrent connections would have them claim to be the same client, and the encryption handshake would derive the same secret for both.
Extended by
Implements
Properties
name
abstractreadonlyname:string
Defined in: KeyedAuthProvider.ts:17
For logs and for choosing between cached sessions.
Implementation of
Methods
createLoginCredentials()
createLoginCredentials(
request):Promise<LoginCredentials>
Defined in: KeyedAuthProvider.ts:38
The chain and the client data, signed for one login.
Parameters
request
Returns
Promise<LoginCredentials>
Implementation of
IAuthProvider.createLoginCredentials
getIdentity()
abstractgetIdentity():Promise<Identity>
Defined in: KeyedAuthProvider.ts:32
The identity this provider logs in as; see IAuthProvider.getIdentity.
Returns
Promise<Identity>
Implementation of
getIdentityPrivateKey()
getIdentityPrivateKey():
Promise<string>
Defined in: KeyedAuthProvider.ts:49
The identity key's private half, PEM-encoded PKCS#8.
Returns
Promise<string>
Implementation of
IAuthProvider.getIdentityPrivateKey
getIdentityPublicKey()
getIdentityPublicKey():
Promise<string>
Defined in: KeyedAuthProvider.ts:44
The identity key's public half, base64 DER.
Returns
Promise<string>
Implementation of
IAuthProvider.getIdentityPublicKey
getMultiplayerToken()
getMultiplayerToken():
Promise<string|undefined>
Defined in: KeyedAuthProvider.ts:54
No token by default: nobody vouches for a key a provider only holds.
Returns
Promise<string | undefined>