-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCargo.toml
174 lines (152 loc) · 5.45 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
[package]
name = "rsasl"
version = "2.2.0"
authors = ["Nadja Reitzenstein <me@dequbed.space>"]
categories = ["authentication", "api-bindings", "network-programming"]
documentation = "https://docs.rs/rsasl"
edition = "2021"
homepage = "https://github.com/dequbed/rsasl"
# Manually list files to include; excluding out-of-tree integration tests and testing binaries that arent useful when
# rsasl is only used as a dependency.
include = [
"Cargo.toml",
"/src/",
"README.md",
"CHANGELOG.md",
"LICENSE.MIT",
"LICENSE.APACHE-2.0",
"/docs/",
"/tests/",
"/examples/"
]
keywords = ["sasl", "authentication", "sso", "framework", "middleware"]
license = "Apache-2.0 OR MIT"
readme = "README.md"
repository = "https://github.com/dequbed/rsasl"
rust-version = "1.65.0"
description = """
The Rust SASL framework, aimed at both middleware-style protocol implementation and application code.
Designed to make SASL authentication simple and safe while handing as much control to the user as possible.
"""
[package.metadata.docs.rs]
all-features = true
[features]
default = [
"config_builder",
# See https://github.com/dtolnay/linkme/issues/49
# "registry_static",
"scram-sha-1",
"scram-sha-2",
"anonymous",
"external",
"oauthbearer",
"xoauth2",
"plain",
"login",
"gssapi"
]
#! # Compile-time mechanism selection
## Enable `SCRAM-SHA-1` and `SCRAM-SHA-1-PLUS`
scram-sha-1 = ["std", "dep:stringprep", "dep:hmac", "dep:digest", "dep:sha1", "dep:base64", "dep:rand", "dep:pbkdf2"]
## Enable `SCRAM-*` and `SCRAM-*-PLUS` mechanisms using `SHA-2`, i.e. `SHA-256` and `SHA-512`
scram-sha-2 = ["std", "dep:stringprep", "dep:hmac", "dep:digest", "dep:sha2", "dep:base64", "dep:rand", "dep:pbkdf2"]
## Enable `ANONYMOUS`
anonymous = ["std"]
## Enable `EXTERNAL`
external = ["std"]
## Enable `PLAIN`
plain = ["std", "dep:stringprep"]
## Enable `LOGIN`
login = ["std"]
## Enable `XOAUTH2`
xoauth2 = ["std"]
## Enable the OAuth2 based `OAUTHBEARER`
oauthbearer = ["std", "dep:serde", "serde_json"]
## Enable the KerberosV5 mechanism `GSSAPI`
gssapi = ["std", "dep:libgssapi", "dep:bitflags"]
#! # Provider flags
#! These flags are relevant for crates that want to use rsasl as authentication provider, i.e. crates implementing
#! network protocols
## Enable provider mode
##
## This feature enables all the required code for providers, e.g. code surrounding `Session`
provider = ["std"]
## Enable transparent Base64 wrapping for provider mode
##
## This enables the `step64` method to wrap a call to `step` in base64-encoding. Adds a dependency on the `base64` crate
provider_base64 = ["std", "provider", "dep:base64"]
#! # Supplier flags
#! These flags are relevant for crates that want to use rsasl as supplier, i.e. applications and libraries making use
#! of protocol implementations with rsasl support
## Enable the ConfigBuilder
config_builder = ["std"]
## Enables the static registry using `linkme`
registry_static = ["std", "dep:linkme"]
#! # Misc flags
#! Other miscellanious flags
## Enable utilities for testing authentication and SASL handling
testutils = ["std", "config_builder"]
## Enable adding custom mechanisms.
##
## **NOTE: This flag indicates an opt-out of SemVer stability guarantees**
##
## The code for adding mechanism from other crates has not stabilized yet and is subject to *breaking* changes even in
## a minor release.
unstable_custom_mechanism = ["std"]
## Enable use of libstd
## If this flag is not set, rsasl is marked !\[no_std\]. However, currently this flag will *always* be enabled as core
## parts of rsasl depend on the stdlib.
std = ["core2/std", "serde_json/std"]
[dependencies]
base64 = { version = "0.22.1", optional = true }
bitflags = { version = "2.6.0", optional = true }
core2 = { version = "0.4.0", default-features = false }
digest = { version = "0.10.7", optional = true }
document-features = { version = "0.2.10", optional = true }
hmac = { version = "0.12.1", optional = true, features = ["reset"] }
libgssapi = { version = "0.7.2", optional = true, default-features = false }
linkme = { version = "0.3.29", optional = true, default-features = false }
pbkdf2 = { version = "0.12.2", optional = true, default-features = false }
rand = { version = "0.8.5", optional = true }
sha1 = { version = "0.10.6", optional = true }
sha2 = { version = "0.10.8", optional = true }
stringprep = { version = "0.1.5", optional = true, default-features = false }
thiserror = { version = "1.0.66", default-features = false }
[dependencies.serde]
version = "1.0.214"
optional = true
default-features = false
features = ["alloc", "derive"]
[dependencies.serde_json]
version = "1.0.132"
optional = true
default-features = false
features = ["alloc"]
[dev-dependencies]
static_assertions = "1.1.0"
[lints.rust]
non_upper_case_globals = "allow"
non_camel_case_types = "allow"
[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
exhaustive_enums = "warn"
exhaustive_structs = "warn"
doc_markdown = "allow"
module_name_repetitions = "allow"
inline_always = "allow"
missing_errors_doc = "allow"
box_default = "allow"
[[example]]
name = "client_simple"
required-features = ["provider", "plain"]
[[example]]
name = "server_plain"
required-features = ["provider", "plain"]
[[example]]
name = "server_scram"
required-features = ["provider", "plain", "scram-sha-2"]
[[example]]
name = "mechanism_selection"
required-features = ["provider", "login", "plain", "scram-sha-1", "scram-sha-2"]