/**
 * Hand-maintained — OAuth2 protocol flows barrel.
 */

// 1 - export domain
export * from './domain';

// 2 - export services
export {
  OAuthCreateTokenAuthorizationCodeService,
  OAuthCreateTokenPasswordService,
  OAuthCreateTokenRefreshService,
  OAuthHubSessionService,
  OAuthRevokeTokenService,
};

// 3 - export handlers
export {
  OAuthAuthorizeHandler,
  OAuthCreateTokenHandler,
  OAuthGetJwksHandler,
  OAuthRevokeTokenHandler,
};

// 4 - import services
import { OAuthCreateTokenAuthorizationCodeService } from './application/create-token/services/o-auth-create-token-authorization-code.service';
import { OAuthCreateTokenPasswordService } from './application/create-token/services/o-auth-create-token-password.service';
import { OAuthCreateTokenRefreshService } from './application/create-token/services/o-auth-create-token-refresh.service';
import { OAuthRevokeTokenService } from './application/revoke-token/services/o-auth-revoke-token.service';
import { OAuthHubSessionService } from './application/session/o-auth-hub-session.service';

// 5 - import handlers
import { OAuthAuthorizeHandler } from './application/authorize/o-auth-authorize.handler';
import { OAuthCreateTokenHandler } from './application/create-token/o-auth-create-token.handler';
import { OAuthGetJwksHandler } from './application/get-jwks/o-auth-get-jwks.handler';
import { OAuthRevokeTokenHandler } from './application/revoke-token/o-auth-revoke-token.handler';

export const OAuthFlowsHandlers = [
  OAuthAuthorizeHandler,
  OAuthCreateTokenHandler,
  OAuthGetJwksHandler,
  OAuthRevokeTokenHandler,
];

export const OAuthFlowsServices = [
  OAuthCreateTokenAuthorizationCodeService,
  OAuthCreateTokenPasswordService,
  OAuthCreateTokenRefreshService,
  OAuthHubSessionService,
  OAuthRevokeTokenService,
];
