본문으로 건너뛰기
cccskills
무료GitHub에 공개

auth

Authenticate with AEM Edge Delivery Services using Adobe IMS OAuth. Opens browser for Adobe ID login and captures token. Works for admin.hlx.page, admin.da.live, and Config Service APIs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Playwright
설치 방법 보기

포함된 파일(4)

  • SKILL.md6.4 KB
  • .releaserc.json49 B
  • CHANGELOG.md22 B
  • package.json84 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

AEM Edge Delivery Services Authentication

Authenticate with Adobe IMS to obtain a Bearer token for all Edge Delivery Services admin operations.

Token Usage

The IMS token works for all admin APIs:

APIUsage
admin.hlx.pagePreview, publish, status, code sync, jobs, logs
admin.da.liveDA content operations (list, source, copy, move)
Config ServiceSites, config, secrets, API keys, profiles

Header: Authorization: Bearer ${IMS_TOKEN}

When to Use This Skill

  • API returns 401 Unauthorized
  • User says "login", "authenticate", "auth"
  • Before any admin operation when token is missing/expired
  • Before generating guides that need API access

Prerequisites

  • Node.js installed
  • Playwright installed (npx playwright install chromium)

Authentication Flow

Step 1: Check Existing Token

CONFIG_FILE=".claude-plugin/project-config.json"
mkdir -p .claude-plugin
grep -qxF '.claude-plugin/' .gitignore 2>/dev/null || echo '.claude-plugin/' >> .gitignore

IMS_TOKEN=$(cat "$CONFIG_FILE" 2>/dev/null | node -e "
  const d = require('fs').readFileSync(0,'utf8');
  try { console.log(JSON.parse(d).imsToken || ''); } catch(e) { console.log(''); }
")
IMS_EXPIRY=$(cat "$CONFIG_FILE" 2>/dev/null | node -e "
  const d = require('fs').readFileSync(0,'utf8');
  try { console.log(JSON.parse(d).imsTokenExpiry || 0); } catch(e) { console.log(0); }
")
NOW=$(date +%s)

if [ -n "$IMS_TOKEN" ] && [ "$IMS_EXPIRY" -gt "$((NOW + 60))" ]; then
  echo "Token valid (expires in $((IMS_EXPIRY - NOW)) seconds)"
  exit 0
fi

echo "Token missing or expired. Starting login..."

Step 2: Install Playwright (if needed)

npx playwright --version 2>/dev/null || npm install -g playwright
npx playwright install chromium 2>/dev/null || true

Step 3: Capture IMS Token via Playwright

Playwright opens browser, local HTTP server captures the OAuth token from redirect, then browser closes automatically.

mkdir -p .claude-plugin

node -e "
const http = require('http');
const fs = require('fs');
const { chromium } = require('playwright');

const CALLBACK_PORT = 9898;
const CONFIG_PATH = '.claude-plugin/project-config.json';

const scopes = 'ab.manage,AdobeID,gnav,openid,org.read,read_organizations,session,aem.frontend.all,additional_info.ownerOrg,additional_info.projectedProductContext,account_cluster.read';

const authUrl = 'https://ims-na1.adobelogin.com/ims/authorize/v2' +
  '?client_id=darkalley' +
  '&scope=' + encodeURIComponent(scopes) +
  '&response_type=token' +
  '&redirect_uri=' + encodeURIComponent('http://localhost:' + CALLBACK_PORT + '/callback');

let browser;

const server = http.createServer((req, res) => {
  const url = new URL(req.url, 'http://localhost:' + CALLBACK_PORT);
  
  if (url.pathname === '/callback') {
    res.writeHead(200, { 'Content-Type': 'text/html' });
    res.end(\\\`<!DOCTYPE html><html><body>
<script>
  const p = new URLSearchParams(window.location.hash.substring(1));
  const token = p.get('access_token');
  const expiresIn = p.get('expires_in');
  if (token) {
    fetch('/token?access_token=' + encodeURIComponent(token) + '&expires_in=' + encodeURIComponent(expiresIn || ''));
    document.body.innerHTML = '<h2>Login successful!</h2>';
  } else {
    fetch('/token?error=failed');
    document.body.innerHTML = '<h2>Login failed</h2>';
  }
</script>
</body></html>\\\`);
    return;
  }
  
  if (url.pathname === '/token') {
    const token = url.searchParams.get('access_token');
    const expiresIn = url.searchParams.get('expires_in');
    res.writeHead(200); res.end();
    server.close();
    
    if (token) {
      const expiresAt = Math.floor(Date.now() / 1000) + parseInt(expiresIn || '86400', 10);
      let config = {};
      try { config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf8')); } catch(e) {}
      config.imsToken = token;
      config.imsTokenExpiry = expiresAt;
      fs.writeFileSync(CONFIG_PATH, JSON.stringify(config, null, 2));
      
      console.log('Authentication successful');
      console.log('Expires: ' + new Date(expiresAt * 1000).toISOString());
      
      // Auto-close browser
      if (browser) browser.close().then(() => process.exit(0));
    } else {
      console.error('Login failed');
      if (browser) browser.close().then(() => process.exit(1));
    }
  }
});

(async () => {
  server.listen(CALLBACK_PORT, 'localhost');
  
  console.log('Opening browser for Adobe ID login...');
  browser = await chromium.launch({ headless: false });
  const page = await browser.newPage();
  await page.goto(authUrl);
  
  // Timeout after 5 minutes
  setTimeout(() => {
    console.error('Login timed out');
    server.close();
    browser.close().then(() => process.exit(1));
  }, 5 * 60 * 1000);
})();
"

Token Storage

Stored in .claude-plugin/project-config.json:

{
  "org": "myorg",
  "site": "mysite",
  "imsToken": "eyJ...",
  "imsTokenExpiry": 1777891272
}
FieldDescription
imsTokenIMS OAuth token
imsTokenExpiryUnix timestamp when token expires

Using the Token

IMS_TOKEN=$(cat .claude-plugin/project-config.json | node -e "
  const d = require('fs').readFileSync(0,'utf8');
  console.log(JSON.parse(d).imsToken);
")

# All APIs use the same header
curl -H "Authorization: Bearer ${IMS_TOKEN}" "https://admin.hlx.page/status/{org}/{site}/main/"
curl -H "Authorization: Bearer ${IMS_TOKEN}" "https://admin.hlx.page/config/{org}/sites.json"
curl -H "Authorization: Bearer ${IMS_TOKEN}" "https://admin.da.live/list/{org}/{site}"

Troubleshooting

IssueSolution
npx playwright not foundRun npm install -g playwright
Browser doesn't openRun npx playwright install chromium
Port 9898 in useKill process or wait
Login page doesn't loadCheck network to ims-na1.adobelogin.com
Token not capturedEnsure login completed before closing browser
401 after loginToken expired, re-authenticate
403 on APIUser lacks permission for that org/site

Integration

Called by: ops, admin, authoring, development, handover

Skill({ skill: "project-management:auth" })

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Analyzes a multi-step conversion funnel to find where visitors drop off and which steps have the worst leakage. Use this skill when someone describes a journey and asks about conversion rates, drop-off, fallout, or step completion. Trigger for "analyze our checkout funnel," "where are visitors dropping off," "what's our add-to-cart to purchase conversion rate," "funnel analysis," "show me fallout between steps," or "which step loses the most visitors."

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 20일 업데이트

Generates a concise, executive-ready performance summary covering key metrics, trends, and what's driving movement. Use this skill when someone needs to produce a briefing, executive summary, performance narrative, or stakeholder readout — for example, "write an exec summary of last week's performance," "create a performance briefing for our leadership team," "produce a monthly business review summary," "what should I tell executives about our metrics," or "generate a performance narrative." Also trigger for "QBR summary," "weekly business review," or "stakeholder briefing."

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 20일 업데이트

Produces a compact KPI digest showing how key metrics changed over a period and what's driving the movement. Use this skill when someone asks for a performance summary, a weekly recap, a morning briefing, a KPI update, or any variation of "how did we do this week/month." Also trigger for "give me a performance overview," "what moved in the last 7 days," "pull our AA KPI report," or "summarize our metrics."

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 20일 업데이트

Compares the performance of two or more audience segments across key metrics side by side. Use this skill when someone wants to compare audiences or visitor groups — for example, "how do mobile visitors compare to desktop on conversion," "compare new vs. returning visitors," "show me the difference between these two segments," "compare these audiences on our KPIs," or "which segment performs better." Also trigger for "segment comparison" or "audience comparison."

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 20일 업데이트

Identifies which items (pages, campaigns, products, channels, regions) had the biggest increases or decreases for a key metric between two time periods. Use this skill when someone asks "what's up and what's down," "which campaigns moved the most," "top gainers and losers," "what pages are trending," "show me what changed by channel," or any variation of identifying the biggest movers and decliners for a metric.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 20일 업데이트

Scan an AEM Edge Delivery Services page for WCAG 2.1 AA accessibility violations and generate specific fixes. Identifies missing alt text, heading hierarchy issues, link text problems, color contrast concerns, and EDS-specific accessibility patterns. Use when fixing accessibility issues, preparing for compliance audits, or remediating WCAG violations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 20일 업데이트

OCIOStateOfNebraska의 스킬 모두 보기

이 스킬의 문제 신고