557
558
async authenticate(resource: string, token: string): Promise<boolean> {
559
>
if (resource === this._gitHubEndpointService.getRepoResource().resource) {
claudeAgent.ts
560
return true;
561
}
562
>
if (resource !== this._gitHubEndpointService.getCopilotResource().resource) {
claudeAgent.ts
563
return false;
564
}
565
>
// Native (BYO-Anthropic) mode needs no proxy and no GitHub token. Record
claudeAgent.ts
566
>
// the token (harmless; lets a later flip back to proxy reuse it) but do
567
>
// NOT start the proxy or treat the absence of a token as unauthenticated.
568
>
if (this._transportMode !== 'proxy') {
569
this._githubToken = token;
570
return true;
571
}
572
const tokenChanged = this._githubToken !== token;
574
this._logService.info('[Claude] Auth token unchanged');
575
return true;