Closed Galacticai closed 4 months ago
@Galacticai is attempting to deploy a commit to the zach-planet-nine's projects Team on Vercel.
A member of the Team first needs to authorize it.
classDiagram
class ISessionless {
+vault: IVault
+generateUUID(): String
+sign(message: String, key: PrivateKey): IMessageSignature
+verify(signedMessage: SignedMessage): Boolean
+associate(...signedMessages: SignedMessage): Boolean
}
class IWithKeyStore {
@Override
^vault: IKeyStoreVault
+generateKeys(access: KeyAccessInfo): KeyPair
+generateKeysAsync(access: KeyAccessInfo): KeyPair
+getKeys(): KeyPair
+sign(message: String, access: KeyAccess): IMessageSignature
}
class IWithCustomVault {
@Override
^vault: ICustomVault
+generateKeys(): KeyPairHex
+generateKeysAsync(): KeyPairHex
+getKeys(): KeyPairHex
+sign(message: String): IMessageSignature
}
ISessionless <-- IWithKeyStore
ISessionless <-- IWithCustomVault
classDiagram
class IVault {
+getDefault(keyStore: KeyStore): KeyStoreVault
}
class IKeyStoreVault {
+keyStore: KeyStore
+save(pair: KeyPair, access: KeyAccessInfo, certificate: Certificate)
+get(access: KeyAccessInfo): KeyPair
}
class ICustomVault {
+save(pair: KeyPairHex)
+get(): KeyPairHex?
}
class KeyStoreVault {
+save(pair: KeyPair, access: KeyAccessInfo)
+constructor(keyStore: KeyStore)
}
IVault <-- IKeyStoreVault
IVault <-- ICustomVault
IKeyStoreVault <-- KeyStoreVault
classDiagram
class IMessageSignature { }
class MessageSignatureInt {
+r: BigInteger
+s: BigInteger
+constructor(r: BigInteger, s: BigInteger)
+constructor(ints: Array<BigInteger>)
+toHex(): MessageSignatureHex
}
class MessageSignatureHex {
+rHex: String
+sHex: String
+constructor(rHex: String, sHex: String)
+toInt(): MessageSignatureInt
}
IMessageSignature <-- MessageSignatureInt
IMessageSignature <-- MessageSignatureHex
classDiagram
class SignedMessage {
+message: String
+signature: MessageSignatureHex
+publicKey: String
+constructor(..all..)
}
class KeyPairHex {
+privateKey: String
+publicKey: String
+constructor(..all..)
}
class KeyAccessInfo {
+alias: String
+password: CharArray?
+constructor(..all..)
+constructor(alias: String, password: String)
}
Sessionless in kotlin
Module:
src/kotlin/standalone/kotlin/
Example (Spring boot web mvc)
src/kotlin/example/spring/
Highlights:
util/
Contains utilities for generating and converting keys... and more
models/
Interfaces or data classes that are meant to represent the data structures or general skeletons used in
impl/...
impl/
Implementations of
models/
Main focus:
..../models/ISessionless.kt
..../impl/Sessionless.kt (implementation of
ISessionless
)Sessionless.WithKeyStore
Sessionless implementation with native support for
java.security.KeyStore
Sessionless.WithCustomVault
Sessionless implementation while allowing custom storage management (
ICustomVault
, with customget
/save
functions)Notice:
Almost all classes, objects, and functions are documented using comment docs which means that your IDE will show you the documentation while typing/hovering/etc...