@nebius/js-sdk - v0.2.54
    Preparing search index...

    Produces a diagnostic token representation with sensitive data partly masked.

    Sanitizing reduces accidental disclosure in logs, but it is not an encryption or access-control boundary. A recognized short v0 payload can remain visible. Avoid logging tokens when possible.

    import { TokenSanitizer } from '@nebius/js-sdk/runtime/token_sanitizer';

    const safe = TokenSanitizer.accessTokenSanitizer().sanitize(accessToken);
    logger.debug('received token', { token: safe });
    Index
    • Returns whether the sanitizer supports the token format.

      Parameters

      • token: string | null | undefined

      Returns boolean

    • Masks the signature or a long payload for a recognized token format.

      A short no-signature payload can remain unchanged. Unknown formats keep at most the first 15 characters. Empty inputs return an empty string.

      Parameters

      • token: string | null | undefined

      Returns string