Refactored parsing of AuthKey.