update identity detection methods

This commit is contained in:
yggverse 2025-01-23 13:28:18 +02:00
parent 9a7984f345
commit d7f6e2f16b
8 changed files with 47 additions and 41 deletions

View file

@ -126,8 +126,8 @@ impl Identity {
/// Get `Identity` match `request`
/// * [Client certificates specification](https://geminiprotocol.net/docs/protocol-specification.gmi#client-certificates)
/// * this function work with memory cache (not database)
pub fn match_scope(&self, request: &str) -> Option<Item> {
if let Some(auth) = self.auth.memory.match_scope(request) {
pub fn get(&self, request: &str) -> Option<Item> {
if let Some(auth) = self.auth.get(request) {
match self.memory.get(auth.profile_identity_id) {
Ok(pem) => {
return Some(Item {