diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index 4a89f9f8a7..33d41a5929 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -526,9 +526,7 @@ export type SearchResponseFile = { content(): Promise; }; -// Warning: (ae-missing-release-tag) "ServerTokenManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export class ServerTokenManager implements TokenManager { // (undocumented) static fromConfig(config: Config): ServerTokenManager; @@ -599,9 +597,7 @@ export interface StatusCheckHandlerOptions { statusCheck?: StatusCheck; } -// Warning: (ae-missing-release-tag) "TokenManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export interface TokenManager { // (undocumented) getToken: () => Promise<{ diff --git a/packages/backend-common/src/tokens/ServerTokenManager.ts b/packages/backend-common/src/tokens/ServerTokenManager.ts index 5ce2262c88..e4afc2997e 100644 --- a/packages/backend-common/src/tokens/ServerTokenManager.ts +++ b/packages/backend-common/src/tokens/ServerTokenManager.ts @@ -19,6 +19,12 @@ import { Config } from '@backstage/config'; import { AuthenticationError } from '@backstage/errors'; import { TokenManager } from './types'; +/** + * Creates and validates tokens for use during backend-to-backend + * authentication. + * + * @public + */ export class ServerTokenManager implements TokenManager { private key: JWK.OctKey | JWK.NoneKey; diff --git a/packages/backend-common/src/tokens/types.ts b/packages/backend-common/src/tokens/types.ts index 39b650b3a3..ede582de26 100644 --- a/packages/backend-common/src/tokens/types.ts +++ b/packages/backend-common/src/tokens/types.ts @@ -14,6 +14,11 @@ * limitations under the License. */ +/** + * Interface for creating and validating tokens. + * + * @public + */ export interface TokenManager { getToken: () => Promise<{ token: string }>; validateToken: (token: string) => void;