1"use strict";(self.webpackChunkdevcenter=self.webpackChunkdevcenter||[]).push([["2059"],{33231(e,n,t){t.r(n),t.d(n,{metadata:()=>i,default:()=>h,frontMatter:()=>s,contentTitle:()=>d,toc:()=>a,assets:()=>c});var i=JSON.parse('{"id":"authentication/authentication","title":"Authentication","description":"Documentation for Authentication in ZeyOS SDK CLI","source":"@site/i18n/en/docusaurus-plugin-content-docs-sdk-docs/current/authentication/index.md","sourceDirName":"authentication","slug":"/authentication","permalink":"/sdk/authentication","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"id":"authentication","title":"Authentication","slug":"/authentication","sidebar_label":"Authentication","description":"Documentation for Authentication in ZeyOS SDK CLI","sidebar_position":10,"keywords":["zeysdk","cli","authentication"]},"sidebar":"sdkDocumentation","previous":{"title":"Debugging","permalink":"/sdk/debugging"},"next":{"title":"ZeyOS Entities","permalink":"/sdk/entities"}}'),r=t(74848),o=t(28453);let s={id:"authentication",title:"Authentication",slug:"/authentication",sidebar_label:"Authentication",description:"Documentation for Authentication in ZeyOS SDK CLI",sidebar_position:10,keywords:["zeysdk","cli","authentication"]},d="Authentication",c={},a=[{value:"1. Environment Variables (Recommended for CI/CD)",id:"1-environment-variables-recommended-for-cicd",level:2},{value:"Platform-Specific Commands",id:"platform-specific-commands",level:3},{value:"2. Stored Credentials (Default for local development)",id:"2-stored-credentials-default-for-local-development",level:2},{value:"Authentication Priority",id:"authentication-priority",level:2},{value:"Security Notes",id:"security-notes",level:2},{value:"Error Handling",id:"error-handling",level:2}];function l(e){let n={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"authentication",children:"Authentication"})}),"\n",(0,r.jsx)(n.p,{children:"The SDK supports two authentication methods for connecting to ZeyOS instances:"}),"\n",(0,r.jsx)(n.h2,{id:"1-environment-variables-recommended-for-cicd",children:"1. Environment Variables (Recommended for CI/CD)"}),"\n",(0,r.jsx)(n.p,{children:"Environment variables are the recommended method for CI/CD environments and automated workflows."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"# Set environment variables\nZEYSDK_TOKEN=your_token\nZEYSDK_SERVER=https://cloud.zeyos.com/your_instance\n\n# Run commands\nzeysdk [command]\n"})}),"\n",(0,r.jsx)(n.h3,{id:"platform-specific-commands",children:"Platform-Specific Commands"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Windows CMD:"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cmd",children:"set ZEYSDK_TOKEN=your_token && set ZEYSDK_SERVER=https://cloud.zeyos.com/your_instance && zeysdk [command]\n"})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Windows PowerShell:"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-powershell",children:'$env:ZEYSDK_TOKEN="your_token"; $env:ZEYSDK_SERVER="https://cloud.zeyos.com/your_instance"; zeysdk [command]\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Linux/macOS:"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"export ZEYSDK_TOKEN=your_token && export ZEYSDK_SERVER=https://cloud.zeyos.com/your_instance && zeysdk [command]\n"})}),"\n",(0,r.jsx)(n.h2,{id:"2-stored-credentials-default-for-local-development",children:"2. Stored Credentials (Default for local development)"}),"\n",(0,r.jsx)(n.p,{children:"For local development, the SDK uses stored credentials by default."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"# Link your instance first\nzeysdk link\n\n# Then run commands\nzeysdk [command]\n"})}),"\n",(0,r.jsx)(n.h2,{id:"authentication-priority",children:"Authentication Priority"}),"\n",(0,r.jsx)(n.p,{children:"Environment variables take precedence over stored credentials. When both are available, the SDK will use the environment variables."}),"\n",(0,r.jsx)(n.h2,{id:"security-notes",children:"Security Notes"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Stored credentials can use OS keychain or file store (configure with ",(0,r.jsx)(n.code,{children:"zeysdk configure"})," -> ",(0,r.jsx)(n.code,{children:"Credential Storage"}),")"]}),"\n",(0,r.jsx)(n.li,{children:"Environment variables are cleared when the terminal session ends"}),"\n",(0,r.jsx)(n.li,{children:"Stored credentials persist between sessions"}),"\n",(0,r.jsx)(n.li,{children:"Use environment variables for CI/CD to avoid storing credentials"}),"\n",(0,r.jsx)(n.li,{children:"Use stored credentials for local development convenience"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"error-handling",children:"Error Handling"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Error"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Resolution"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Missing token"}),(0,r.jsx)(n.td,{children:"No authentication provided"}),(0,r.jsxs)(n.td,{children:["Set environment variables or run ",(0,r.jsx)(n.code,{children:"zeysdk link"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Invalid token"}),(0,r.jsx)(n.td,{children:"Bad credentials"}),(0,r.jsx)(n.td,{children:"Check token validity"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Server error"}),(0,r.jsx)(n.td,{children:"Invalid server URL"}),(0,r.jsx)(n.td,{children:"Verify server URL format"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Network error"}),(0,r.jsx)(n.td,{children:"Connection failed"}),(0,r.jsx)(n.td,{children:"Check connectivity"})]})]})]})]})}function h(e={}){let{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},28453(e,n,t){t.d(n,{R:()=>s,x:()=>d});var i=t(96540);let r={},o=i.createContext(r);function s(e){let n=i.useContext(o);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.