Skip to content

square

square

Classes:

Name Description
SquareAPIKeys

Match Square API Keys.

SquareAPIKeys()

Bases: RegexPredictor

Match Square API Keys.

Source code in src/nemo_safe_synthesizer/pii_replacer/ner/regexes/square.py
def __init__(self):
    entity = Entity.SQUARE_API_KEY

    # atp: personal access token
    # idp: sandbox application id
    # atb: sandbox access token
    # idp: application id
    _match_1 = Pattern(pattern=r"sq0(atp|idp|atb|idp)-[0-9A-Za-z-_]{22}", raw_score=Score.HIGH)

    # OAuth Secret
    _match_2 = Pattern(pattern=r"sq0csp-[0-9A-Za-z-_]{43}", raw_score=Score.HIGH)

    super().__init__(entity=entity, patterns=[_match_1, _match_2])