astro-datalab / datalab

Python client to interface with the NSF NOIRLab's Astro Data Lab Science Platform.
MIT License
22 stars 8 forks source link

Adding utility token functions #54 #55

Closed iglesu closed 2 years ago

iglesu commented 2 years ago

This commit is linked to issue #54

Three token manipulation functions have been added to the Util.py package namely:

.- "parse_auth_token: runs a regular expression on a string and returns a regex Match object or nothing .- split_auth_token: takes the Matched object and converts it into an array .- is_auth_token: returns True if parse_auth_token returns a match or False otherwise

Added unit test tests/test_util.py to test split_auth_token and is_auth_token