backend-common: add api doc comments

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
Mike Lewis
2021-11-23 18:22:53 +00:00
parent 4b6de2f872
commit 40ea710c14
3 changed files with 13 additions and 6 deletions
+2 -6
View File
@@ -526,9 +526,7 @@ export type SearchResponseFile = {
content(): Promise<Buffer>;
};
// 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<{
@@ -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;
@@ -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;