MCPcopy Create free account
hub / github.com/Keats/jsonwebtoken / new_impl

Method new_impl

src/validation.rs:119–137  ·  view source on GitHub ↗
(algorithms: Vec<Algorithm>)

Source from the content-addressed store, hash-verified

117 }
118
119 fn new_impl(algorithms: Vec<Algorithm>) -> Validation {
120 let mut required_claims = HashSet::with_capacity(1);
121 required_claims.insert("exp".to_owned());
122
123 Validation {
124 required_spec_claims: required_claims,
125 algorithms,
126 leeway: 60,
127 reject_tokens_expiring_in_less_than: 0,
128
129 validate_exp: true,
130 validate_nbf: false,
131 validate_aud: true,
132
133 iss: None,
134 sub: None,
135 aud: None,
136 }
137 }
138
139 /// `aud` is a collection of one or more acceptable audience members
140 /// The simple usage is `set_audience(&["some aud name"])`

Callers

nothing calls this directly

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected