systemprompt_models/execution/context/
credential.rs1use super::RequestContext;
12
13impl RequestContext {
14 #[must_use]
15 pub const fn with_browser_session(mut self) -> Self {
16 self.auth.browser_session = true;
17 self
18 }
19
20 #[must_use]
21 pub const fn is_browser_session(&self) -> bool {
22 self.auth.browser_session
23 }
24
25 #[must_use]
26 pub const fn with_cookie_transport(mut self) -> Self {
27 self.auth.cookie_transport = true;
28 self
29 }
30
31 #[must_use]
32 pub const fn is_cookie_transport(&self) -> bool {
33 self.auth.cookie_transport
34 }
35
36 #[must_use]
37 pub const fn with_token_exp(mut self, token_exp: i64) -> Self {
38 self.auth.token_exp = Some(token_exp);
39 self
40 }
41
42 #[must_use]
43 pub const fn token_exp(&self) -> Option<i64> {
44 self.auth.token_exp
45 }
46}