Lines Matching refs:hat
64 hat: Mutex<Option<HardwareAuthToken>>, field
71 Arc::new(Self { state: AuthRequestState::OpAuth, hat: Mutex::new(None) }) in op_auth()
77 hat: Mutex::new(None), in timestamped_op_auth()
82 hat: HardwareAuthToken, in timestamp()
85 Arc::new(Self { state: AuthRequestState::TimeStamp(receiver), hat: Mutex::new(Some(hat)) }) in timestamp()
88 fn add_auth_token(&self, hat: HardwareAuthToken) { in add_auth_token()
89 *self.hat.lock().unwrap() = Some(hat) in add_auth_token()
93 let hat = self in get_auth_tokens() localVariable
94 .hat in get_auth_tokens()
111 Ok((hat, tst)) in get_auth_tokens()
178 pub fn add_auth_token(&self, hat: HardwareAuthToken) { in add_auth_token()
184 map.remove_entry(&hat.challenge) in add_auth_token()
188 recv.add_auth_token(hat); in add_auth_token()
214 fn add_auth_token(&self, hat: HardwareAuthToken) { in add_auth_token()
216 state_arc.add_auth_token(hat); in add_auth_token()
268 DeferredAuthState::TimeStampRequired(hat) => { in finalize_create_authorization()
269 let hat = (*hat).clone(); in finalize_create_authorization() localVariable
271 let auth_request = AuthRequest::timestamp(hat, receiver); in finalize_create_authorization()
313 self.get_auth_tokens().map(|(hat, tst)| (hat, tst, confirmation_token)) in before_finish()
346 if let Some((hat, tst)) = deferred_tokens { in get_auth_tokens()
347 self.state = DeferredAuthState::Token(hat, tst); in get_auth_tokens()
352 DeferredAuthState::Token(hat, tst) => Ok((Some((*hat).clone()), (*tst).clone())), in get_auth_tokens()
635 let hat_and_last_off_body = Self::find_auth_token(|hat: &AuthTokenEntry| { in authorize_create()
637 hat.satisfies(&user_secure_ids, auth_type) in authorize_create()
652 let hat = match (hat_and_last_off_body, key_time_out) { in authorize_create() localVariable
653 (Some((hat, last_off_body)), Some(key_time_out)) => { in authorize_create()
656 .checked_sub(&hat.time_received()) in authorize_create()
663 let on_body_extended = allow_while_on_body && last_off_body < hat.time_received(); in authorize_create()
669 Some(hat) in authorize_create()
671 (Some((hat, _)), None) => Some(hat), in authorize_create()
678 Ok(match (hat, requires_timestamp, per_op_bound) { in authorize_create()
684 (Some(hat), true, false) => ( in authorize_create()
685 Some(hat.auth_token().clone()), in authorize_create()
686 DeferredAuthState::TimeStampRequired(hat.take_auth_token()), in authorize_create()
688 (Some(hat), false, true) => { in authorize_create()
689 (Some(hat.take_auth_token()), DeferredAuthState::OpAuthRequired) in authorize_create()
691 (Some(hat), false, false) => { in authorize_create()
692 (Some(hat.take_auth_token()), DeferredAuthState::NoAuthRequired) in authorize_create()
697 .map(|(hat, state)| { in authorize_create()
698 (hat, AuthInfo { state, key_usage_limited, confirmation_token_receiver }) in authorize_create()
750 pub fn add_auth_token(&self, hat: HardwareAuthToken) { in add_auth_token()
751 DB.with(|db| db.borrow_mut().insert_auth_token(&hat)); in add_auth_token()
752 self.op_auth_map.add_auth_token(hat); in add_auth_token()
818 let result = Self::find_auth_token(|hat: &AuthTokenEntry| { in get_auth_tokens()
819 (challenge == hat.challenge()) && hat.satisfies(&sids, auth_type) in get_auth_tokens()