Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3113835
D3945.id12580.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3945.id12580.diff
View Options
diff --git a/services/identity/Cargo.lock b/services/identity/Cargo.lock
--- a/services/identity/Cargo.lock
+++ b/services/identity/Cargo.lock
@@ -171,6 +171,7 @@
"num-integer",
"num-traits",
"serde",
+ "time",
"winapi",
]
@@ -685,6 +686,7 @@
version = "0.1.0"
dependencies = [
"argon2",
+ "chrono",
"clap",
"curve25519-dalek",
"derive_more",
@@ -1521,6 +1523,16 @@
"once_cell",
]
+[[package]]
+name = "time"
+version = "0.1.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
[[package]]
name = "tokio"
version = "1.18.1"
diff --git a/services/identity/Cargo.toml b/services/identity/Cargo.toml
--- a/services/identity/Cargo.toml
+++ b/services/identity/Cargo.toml
@@ -19,6 +19,7 @@
rusoto_dynamodb = "0.47.0"
tracing = "0.1"
tracing-subscriber = "0.3"
+chrono = "0.4.19"
[build-dependencies]
tonic-build = "0.6"
diff --git a/services/identity/src/main.rs b/services/identity/src/main.rs
--- a/services/identity/src/main.rs
+++ b/services/identity/src/main.rs
@@ -9,6 +9,7 @@
mod keygen;
mod opaque;
mod service;
+mod token;
use config::Config;
use keygen::generate_and_persist_keypair;
diff --git a/services/identity/src/token.rs b/services/identity/src/token.rs
new file mode 100644
--- /dev/null
+++ b/services/identity/src/token.rs
@@ -0,0 +1,13 @@
+use chrono::{DateTime, Utc};
+
+pub enum AuthType {
+ Password,
+ Wallet,
+}
+
+pub struct AccessToken {
+ pub token: Option<String>,
+ pub created: Option<DateTime<Utc>>,
+ pub auth_type: Option<AuthType>,
+ pub valid: Option<bool>,
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 1, 7:32 PM (20 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2400583
Default Alt Text
D3945.id12580.diff (1 KB)
Attached To
Mode
D3945: [Identity] Add new types to handle tokens
Attached
Detach File
Event Timeline
Log In to Comment