'use strict';

var DefaultIdentityClient = require('./DefaultIdentityClient.cjs.js');

class IdentityClient {
  defaultIdentityClient;
  static create(options) {
    return new IdentityClient(DefaultIdentityClient.DefaultIdentityClient.create(options));
  }
  constructor(defaultIdentityClient) {
    this.defaultIdentityClient = defaultIdentityClient;
  }
  /**
   * Verifies the given backstage identity token
   * Returns a BackstageIdentity (user) matching the token.
   * The method throws an error if verification fails.
   *
   * @deprecated You should start to use IdentityApi#getIdentity instead of authenticate
   * to retrieve the user identity.
   */
  async authenticate(token) {
    return await this.defaultIdentityClient.authenticate(token);
  }
}

exports.IdentityClient = IdentityClient;
//# sourceMappingURL=IdentityClient.cjs.js.map
