NetworkGithubTokenResult network.github-token-result@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/network/github-token-result.v1.json

network.github-token-result@1: the answer of network.integration.github.read on OpenVibe.Network. GET /internal/integrations/github-token (a service token holding the capability; the shared internal key is refused) → { token, source }: the network's read-only GitHub API token and where it is set (GITHUB_TOKEN in the environment, or the value the owner saved in admin). Answered with Cache-Control: no-store; 404 { error: not_configured, detail } when no token is set.

Fields

FieldTypeRequiredDescriptionConstraints
tokenstringyesA GitHub token (ghp_…, github_pat_…). A secret: never log or show it.
  • minLength 1
sourceenumyesenv: GITHUB_TOKEN; database: saved in admin (Settings → GitHub).
  • one of "env", "database", "unset"

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: env
{
  "token": "ghp_0123456789abcdefghijABCDEFGHIJ0123456789",
  "source": "env"
}
Rejected: unknown-source
{
  "token": "ghp_0123456789abcdefghijABCDEFGHIJ0123456789",
  "source": "vault"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('network.github-token-result@1', value);   // { valid, errors: [{ path, message }] }