mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2025-06-11 02:43:20 +02:00
switch to uuid parsing for tokens
This commit is contained in:
@ -14,6 +14,7 @@ use std::convert::TryFrom;
|
||||
use std::fmt::{Debug, Display, Formatter};
|
||||
use std::io::Write;
|
||||
use std::sync::Arc;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::authentication::fabfire::FabFireCardKey;
|
||||
use crate::CONFIG;
|
||||
@ -361,8 +362,11 @@ impl Authentication for FabFire {
|
||||
Ok(_) => {
|
||||
match apdu_response.body {
|
||||
Some(data) => {
|
||||
let authid = hex::encode(data)
|
||||
.trim_matches(char::from(0))
|
||||
let data = data.get(..16).ok_or(FabFireError::ParseError)?;
|
||||
let authid = uuid::Uuid::from_slice(data)
|
||||
.unwrap()
|
||||
.to_hyphenated()
|
||||
.encode_lower(&mut Uuid::encode_buffer())
|
||||
.to_string();
|
||||
let prov = ThisProvider::<AuthId>::with(&authid);
|
||||
let key = session
|
||||
|
Reference in New Issue
Block a user