-
Notifications
You must be signed in to change notification settings - Fork 20
/
Cargo.toml
217 lines (192 loc) · 10.6 KB
/
Cargo.toml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
[package]
name = "zitadel"
description = "An implementation of ZITADEL API access and authentication in Rust."
version = "0.0.0-development"
edition = "2021"
license = "MIT OR Apache-2.0"
authors = ["Christoph Bühler <christoph@smartive.ch>"]
repository = "https://github.com/buehler/zitadel-rust"
keywords = ["ZITADEL", "gRPC", "clients", "authentication", "oidc"]
categories = ["authentication", "api-bindings"]
include = [
"src/**/*.rs",
"Cargo.toml",
"LICENSE*",
"README.md",
]
[features]
default = ["tls-roots"]
## Feature that enables support for the [actix framework](https://actix.rs/).
actix = ["credentials", "oidc", "dep:actix-web"]
## The API feature enables all gRPC service clients to access the ZITADEL API.
api = [
"api-admin-v1",
"api-auth-v1",
"api-management-v1",
"api-system-v1",
"api-oidc-v2",
"api-org-v2",
"api-session-v2",
"api-settings-v2",
"api-user-v2"
]
## The API feature enables all gRPC service clients to access the respective ZITADEL API.
api-admin-v1 = ["api-common", "zitadel-admin-v1" ]
## The API feature enables all gRPC service clients to access the respective ZITADEL API.
api-auth-v1 = ["api-common", "zitadel-auth-v1" ]
## The API feature enables all gRPC service clients to access the respective ZITADEL API.
api-management-v1 = ["api-common", "zitadel-v1-v1" ]
## The API feature enables all gRPC service clients to access the respective ZITADEL API.
api-system-v1 = ["api-common", "zitadel-system-v1", "zitadel-authn-v1" ]
## The API feature enables all gRPC service clients to access the respective ZITADEL API.
api-oidc-v2 = ["api-common", "zitadel-oidc-v2" ]
## The API feature enables all gRPC service clients to access the respective ZITADEL API.
api-org-v2 = ["api-common", "zitadel-org-v2", "zitadel-user-v2" ]
## The API feature enables all gRPC service clients to access the respective ZITADEL API.
api-session-v2 = ["api-common", "zitadel-session-v2" ]
## The API feature enables all gRPC service clients to access the respective ZITADEL API.
api-settings-v2 = ["api-common", "zitadel-settings-v2" ]
## The API feature enables all gRPC service clients to access the respective ZITADEL API.
api-user-v2 = ["api-common", "zitadel-user-v2" ]
api-common = ["dep:prost", "dep:prost-types", "dep:tonic", "dep:tonic-types", "dep:pbjson-types" ]
tls-roots = ["tonic/tls-roots"]
tls-webpki-roots = ["tonic/tls-webpki-roots"]
## Feature that enables support for the [axum framework](https://docs.rs/axum/latest/axum/).
axum = ["credentials", "oidc", "dep:axum", "dep:axum-extra"]
## The credentials feature enables special credentials helpers for ZITADEL.
## For example, it allows the user to create a ZITADEL service account and
## authenticate against ZITADEL.
credentials = ["dep:jsonwebtoken", "dep:openidconnect", "dep:reqwest", "dep:serde", "dep:serde_json", "dep:serde_urlencoded", "dep:time"]
## The interceptors feature enables specific gRPC interceptors and
## new convenience functions to create a gRPC client with interceptors.
## The interceptors provide easy access to an authenticated ZITADEL API client.
## The interceptors work with the credentials from this crate.
interceptors = ["credentials", "dep:time", "dep:tokio"]
## This feature enables caching of the OIDC discovery and introspection results.
## By default, only the in-memory cache is available. To use a different cache,
## enable specific features of this crate, or implement your own cache with
## the trait.
introspection_cache = ["dep:async-trait", "dep:time", "dep:moka"]
## The OIDC module enables basic OIDC (OpenID Connect) features to communicate
## with ZITADEL. Two examples are the `discover` and `introspect` functions.
## The OIDC features are required for some of the web framework features.
oidc = ["credentials", "dep:base64-compat"]
## Feature that enables support for the [rocket framework](https://rocket.rs/).
## It enables authentication features for rocket in the form of route guards.
## Refer to the rocket module for more information.
rocket = ["credentials", "oidc", "dep:rocket"]
## Feature that enables support for the [rocket okapi](https://github.com/GREsau/okapi).
rocket_okapi = ["rocket", "dep:rocket_okapi", "dep:schemars"]
# @@protoc_deletion_point(features)
# This section is automatically generated by protoc-gen-prost-crate.
# Changes in this area may be lost on regeneration.
proto_full = ["zitadel-action-v1","zitadel-admin-v1","zitadel-app-v1","zitadel-auth-v1","zitadel-authn-v1","zitadel-change-v1","zitadel-event-v1","zitadel-feature-v1","zitadel-feature-v2","zitadel-feature-v2beta","zitadel-idp-v1","zitadel-idp-v2","zitadel-instance-v1","zitadel-management-v1","zitadel-member-v1","zitadel-metadata-v1","zitadel-milestone-v1","zitadel-object-v2","zitadel-object-v2beta","zitadel-object-v3alpha","zitadel-oidc-v2","zitadel-oidc-v2beta","zitadel-org-v1","zitadel-org-v2","zitadel-org-v2beta","zitadel-policy-v1","zitadel-project-v1","zitadel-protoc_gen_zitadel-v2","zitadel-quota-v1","zitadel-resources-action-v3alpha","zitadel-resources-object-v3alpha","zitadel-resources-user-v3alpha","zitadel-resources-userschema-v3alpha","zitadel-resources-webkey-v3alpha","zitadel-session-v2","zitadel-session-v2beta","zitadel-settings-object-v3alpha","zitadel-settings-v1","zitadel-settings-v2","zitadel-settings-v2beta","zitadel-system-v1","zitadel-text-v1","zitadel-user-v1","zitadel-user-v2","zitadel-user-v2beta","zitadel-v1","zitadel-v1-v1"]
"zitadel-action-v1" = ["zitadel-v1"]
"zitadel-admin-v1" = ["zitadel-event-v1","zitadel-idp-v1","zitadel-instance-v1","zitadel-management-v1","zitadel-member-v1","zitadel-milestone-v1","zitadel-org-v1","zitadel-policy-v1","zitadel-settings-v1","zitadel-text-v1","zitadel-v1","zitadel-v1-v1"]
"zitadel-app-v1" = ["zitadel-v1"]
"zitadel-auth-v1" = ["zitadel-change-v1","zitadel-idp-v1","zitadel-metadata-v1","zitadel-org-v1","zitadel-policy-v1","zitadel-user-v1","zitadel-v1"]
"zitadel-authn-v1" = ["zitadel-v1"]
"zitadel-change-v1" = ["zitadel-v1"]
"zitadel-event-v1" = ["zitadel-v1"]
"zitadel-feature-v1" = []
"zitadel-feature-v2" = ["zitadel-object-v2"]
"zitadel-feature-v2beta" = ["zitadel-object-v2beta"]
"zitadel-idp-v1" = ["zitadel-v1"]
"zitadel-idp-v2" = ["zitadel-object-v2"]
"zitadel-instance-v1" = ["zitadel-v1"]
"zitadel-management-v1" = ["zitadel-action-v1","zitadel-app-v1","zitadel-authn-v1","zitadel-change-v1","zitadel-idp-v1","zitadel-member-v1","zitadel-metadata-v1","zitadel-org-v1","zitadel-policy-v1","zitadel-project-v1","zitadel-text-v1","zitadel-user-v1","zitadel-v1"]
"zitadel-member-v1" = ["zitadel-user-v1","zitadel-v1"]
"zitadel-metadata-v1" = ["zitadel-v1"]
"zitadel-milestone-v1" = []
"zitadel-object-v2" = []
"zitadel-object-v2beta" = []
"zitadel-object-v3alpha" = []
"zitadel-oidc-v2" = ["zitadel-object-v2"]
"zitadel-oidc-v2beta" = ["zitadel-object-v2beta"]
"zitadel-org-v1" = ["zitadel-v1"]
"zitadel-org-v2" = ["zitadel-object-v2"]
"zitadel-org-v2beta" = ["zitadel-object-v2beta"]
"zitadel-policy-v1" = ["zitadel-idp-v1","zitadel-v1"]
"zitadel-project-v1" = ["zitadel-v1"]
"zitadel-protoc_gen_zitadel-v2" = []
"zitadel-quota-v1" = []
"zitadel-resources-action-v3alpha" = ["zitadel-object-v3alpha","zitadel-resources-object-v3alpha"]
"zitadel-resources-object-v3alpha" = ["zitadel-object-v3alpha"]
"zitadel-resources-user-v3alpha" = ["zitadel-object-v3alpha","zitadel-resources-object-v3alpha"]
"zitadel-resources-userschema-v3alpha" = ["zitadel-object-v3alpha","zitadel-resources-object-v3alpha"]
"zitadel-resources-webkey-v3alpha" = ["zitadel-object-v3alpha","zitadel-resources-object-v3alpha"]
"zitadel-session-v2" = ["zitadel-object-v2","zitadel-v1"]
"zitadel-session-v2beta" = ["zitadel-object-v2beta","zitadel-v1"]
"zitadel-settings-object-v3alpha" = ["zitadel-object-v3alpha"]
"zitadel-settings-v1" = ["zitadel-v1"]
"zitadel-settings-v2" = ["zitadel-object-v2"]
"zitadel-settings-v2beta" = ["zitadel-object-v2beta"]
"zitadel-system-v1" = ["zitadel-feature-v1","zitadel-instance-v1","zitadel-member-v1","zitadel-quota-v1","zitadel-v1"]
"zitadel-text-v1" = ["zitadel-v1"]
"zitadel-user-v1" = ["zitadel-v1"]
"zitadel-user-v2" = ["zitadel-object-v2"]
"zitadel-user-v2beta" = ["zitadel-object-v2beta"]
"zitadel-v1" = []
"zitadel-v1-v1" = ["zitadel-authn-v1","zitadel-idp-v1","zitadel-management-v1","zitadel-org-v1","zitadel-v1"]
# @@protoc_insertion_point(features)
[dependencies]
actix-web = { version = "4.5.1", optional = true }
async-trait = { version = "0.1.80", optional = true }
axum = { version = "0.7.5", optional = true, features = ["macros"] }
axum-extra = { version = "0.9.3", optional = true, features = ["typed-header"] }
base64-compat = { version = "1", optional = true }
custom_error = "1.9.2"
document-features = { version = "0.2.8", optional = true }
jsonwebtoken = { version = "9.3.0", optional = true }
moka = { version = "0.12.8", features = ["future"], optional = true }
openidconnect = { version = "3.5.0", optional = true }
pbjson-types = { version = "0.7.0", optional = true }
prost = { version = "0.13.1", optional = true }
prost-types = { version = "0.13.1", optional = true }
reqwest = { version = "0.11.27", features = ["json", "rustls-tls"], default-features = false, optional = true }
rocket = { version = "0.5.0", optional = true }
serde = { version = "1.0.200", features = ["derive"], optional = true }
serde_json = { version = "1.0.116", optional = true }
serde_urlencoded = { version = "0.7.1", optional = true }
time = { version = "0.3.36", optional = true }
tokio = { version = "1.37.0", optional = true, features = [
"macros",
"rt-multi-thread",
] }
tonic = { version = "0.12.1", features = [
"tls",
], optional = true }
rocket_okapi = { version = "0.9.0", optional = true, default-features = false }
schemars = {version = "0.8.21", optional = true}
tonic-types = { version = "0.12.1", optional = true }
[dev-dependencies]
chrono = "0.4.38"
tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread"] }
tower = { version = "0.5.0" }
http-body-util = "0.1.0"
[package.metadata.docs.rs]
all-features = true
[[example]]
name = "actix_webapi_oauth_interception_basic"
required-features = ["actix"]
[[example]]
name = "axum_webapi_oauth_interception_basic"
required-features = ["axum"]
[[example]]
name = "fetch_profile_with_pat"
required-features = ["api", "interceptors"]
[[example]]
name = "fetch_profile_with_service_account"
required-features = ["api", "interceptors"]
[[example]]
name = "rocket_webapi_oauth_interception_basic"
required-features = ["rocket"]
[[example]]
name = "rocket_webapi_oauth_interception_jwtprofile_cached"
required-features = ["rocket", "introspection_cache"]
[[example]]
name = "rocket_webapi_oauth_interception_jwtprofile"
required-features = ["rocket"]
[[example]]
name = "service_account_authentication"
required-features = ["credentials"]