From 915064dd744ac4d5378a741316f1cd52df93a5cc Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Sat, 26 Sep 2009 01:55:48 +0000 Subject: [PATCH] added verify_cred_is_me() --- sfa/trust/auth.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sfa/trust/auth.py b/sfa/trust/auth.py index 298d0329..f0574d93 100644 --- a/sfa/trust/auth.py +++ b/sfa/trust/auth.py @@ -64,6 +64,16 @@ class Auth: return True + + def verify_cred_is_me(self, credential): + is_me = False + cred = Credential(string=credential) + caller_gid = cred.get_gid_caller() + caller_hrn = caller_gid.get_hrn() + if caller_hrn != self.config.SFA_INTERFACE_HRN: + raise GeniPermissionError(self.config.SFA_INTEFACE_HRN) + + return def get_auth_info(self, auth_hrn): """ -- 2.47.0