X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Ftrust%2Fauth.py;fp=sfa%2Ftrust%2Fauth.py;h=18c3d61506aa983f7acf1978f9f74718939c7faf;hb=146e88ac4121461b1d0c625c2f6b16c84b9f7e85;hp=39e77e943ace9beb9c8d0b7f18198cbc6e0dd7ee;hpb=28747eb7727f342193ff9cd0859bfa65ec1e8ee3;p=sfa.git diff --git a/sfa/trust/auth.py b/sfa/trust/auth.py index 39e77e94..18c3d615 100644 --- a/sfa/trust/auth.py +++ b/sfa/trust/auth.py @@ -67,6 +67,7 @@ class Auth: # won't work if either creds or hrns is empty - let's make it more explicit if not creds: raise Forbidden("no credential provided") if not hrns: hrns = [None] + error=[None,None] for cred in creds: for hrn in hrns: try: @@ -93,7 +94,7 @@ class Auth: check_sliver_callback(valid, sliver_xrns) if not len(valid): - raise Forbidden("Invalid credential") + raise Forbidden("Invalid credential %s -- %s"%(error[0],error[1])) if speaking_for_hrn and not speaks_for_cred: raise InsufficientRights('Access denied: "geni_speaking_for" option specified but no valid speaks for credential found: %s -- %s' % (error[0],error[1]))