MCPcopy Create free account
hub / github.com/Noumena-Network/code / makeOauthBackedRetrySession

Function makeOauthBackedRetrySession

src/services/api/withRetry.test.ts:106–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106function makeOauthBackedRetrySession(): ResolvedAuthSession {
107 return {
108 principalKind: 'service_principal',
109 principalSource: 'service_oauth_env',
110 sessionState: 'usable',
111 headersKind: 'bearer',
112 providerAuthKind: 'noumena_first_party',
113 providerPlan: {
114 mode: 'noumena_managed',
115 source: 'service_credential',
116 staticKeyEnvVarName: null,
117 },
118 isInteractive: true,
119 canRefresh: false,
120 canReauthenticateInteractively: false,
121 identity: {
122 email: null,
123 accountUuid: null,
124 organizationUuid: null,
125 organizationName: null,
126 },
127 subscription: {
128 subscriptionName: null,
129 subscriptionType: null,
130 rateLimitTier: null,
131 },
132 scopes: ['user:inference'],
133 hasUsableToken: true,
134 hasUsableApiKey: false,
135 accessToken: 'oauth-backed-token',
136 accessTokenExpiresAt: Date.now() + 10 * 60 * 1_000,
137 refreshTokenPresent: false,
138 apiKey: null,
139 rawAuthTokenSource: 'CLAUDE_CODE_OAUTH_TOKEN',
140 rawApiKeySource: null,
141 recoveryAction: 'none',
142 recoveryMessage: null,
143 sourceDetails: {
144 usedLegacyCompat: false,
145 usedEnvVar: true,
146 usedFileDescriptor: false,
147 usedHelper: false,
148 },
149 }
150}
151
152function makeApiKeyRetrySession(): ResolvedAuthSession {
153 return {

Callers 1

withRetry.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected