mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 13:08:16 -06:00
Optimize return values
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
This commit is contained in:
parent
77c3d67c47
commit
d1de741695
@ -29,9 +29,7 @@ class TokenAuthentication(authentication.TokenAuthentication):
|
|||||||
if not token.validate_client_ip(clientip):
|
if not token.validate_client_ip(clientip):
|
||||||
raise exceptions.AuthenticationFailed(f"Source IP {clientip} is not allowed to use this token.")
|
raise exceptions.AuthenticationFailed(f"Source IP {clientip} is not allowed to use this token.")
|
||||||
|
|
||||||
return token_user, token
|
return authenticationresult
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
def authenticate_credentials(self, key):
|
def authenticate_credentials(self, key):
|
||||||
model = self.get_model()
|
model = self.get_model()
|
||||||
|
Loading…
Reference in New Issue
Block a user