message: auth-backend: migrate atlassian provider to use integration helper
diff: @@ -37,12 +37,12 @@ import {
  } from '../../lib/passport';
  import {
  AuthHandler,
  - AuthProviderFactory,
  AuthResolverContext,
  RedirectInfo,
  SignInResolver,
  } from '../types';
  import express from 'express';
  +import { createAuthProviderIntegration } from '../createAuthProviderIntegration';
  export type AtlassianAuthProviderOptions = OAuthProviderOptions & {
  scopes: string;
  @@ -179,7 +179,13 @@ export type AtlassianProviderOptions = {
  };
  };
  -export const createAtlassianProvider = (options?: {
  +/**
  + * Auth provider integration for atlassian auth
  + *
  + * @public
  + */
  +export const atlassian = createAuthProviderIntegration({
  + create(options?: {
  /**
  * The profile transformation function used to verify and convert the auth response
  * into the profile that will be presented to the user.
  @@ -192,7 +198,7 @@ export const createAtlassianProvider = (options?: {
  signIn?: {
  resolver: SignInResolver<OAuthResult>;
  };
  -}): AuthProviderFactory => {
  + }) {
  return ({ providerId, globalConfig, config, resolverContext }) =>
  OAuthEnvironmentHandler.mapConfig(config, envConfig => {
  const clientId = envConfig.getString('clientId');
  @@ -221,4 +227,11 @@ export const createAtlassianProvider = (options?: {
  callbackUrl,
  });
  });
  -};
  + },
  +});
  +
  +/**
  + * @public
  + * @deprecated Use `providers.atlassian.create` instead
  + */
  +export const createAtlassianProvider = atlassian.create;
  