aboutsummaryrefslogtreecommitdiff
path: root/gpg/skeybase/src/main/scala/com/github/jodersky/skeybase/responses.scala
blob: 9d9edf272e5460136a9b43d350054d5b15875f32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.github.jodersky.skeybase

/** A keybase user. */
case class User(basics: Basics, proofs: Seq[Proof], primaryKey: PublicKey)

/** Basic information about a user. */
case class Basics(username: String)

/**
 * An identity "proof" consisting of an online, cryptographically signed statement asserting
 * that a specific username of an online service has control of the signing key.
 * @param nametag the name of the user controlling the key
 * @param proofType string identifying the kind of proof, i.e. the service or website
 * @param proofUrl the URL under which the proof can be found
 */
case class Proof(nametag: String, proofType: String, proofUrl: String)

/** An OpenPGP public key belonging to a user, represented by its fingerprint*/
case class PublicKey(fingerprint: String)

/**
 * A statement, usually available in a signed form, that asserts
 * the ownership of a public key and service handle (i.e. a username
 * or an entire website).
 */
case class OwnershipStatement(body: StatementBody)

/** 
 * Actual meaningful contents of an ownership statement.
 */
case class StatementBody(key: PublicKey, service: Service)

/**
 * An online service, e.g. a social media handle or a website. 
 * Note: since keybase.io are inconsistent with their statements across various services, this class
 * provides only optional fields. It is up to verifiers to ensure that the correct fields are set.  
 */
case class Service(name: Option[String], username: Option[String], hostname: Option[String], domain: Option[String])