Skip to main content
Glama
by cycodehq
jwt_creator.pyโ€ข745 B
from cycode.cli.utils.string_utils import hash_string_to_sha256 _SEPARATOR = '::' def _get_hashed_creator(client_id: str, client_secret: str) -> str: return hash_string_to_sha256(_SEPARATOR.join([client_id, client_secret])) class JwtCreator: def __init__(self, hashed_creator: str) -> None: self._hashed_creator = hashed_creator def __str__(self) -> str: return self._hashed_creator @classmethod def create(cls, client_id: str, client_secret: str) -> 'JwtCreator': return cls(_get_hashed_creator(client_id, client_secret)) def __eq__(self, other: 'JwtCreator') -> bool: if not isinstance(other, JwtCreator): return NotImplemented return str(self) == str(other)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cycodehq/cycode-cli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server