Skip to content

Restructure module to allow importing as Nuget package in another binary module #124

Description

@PalmEmanuel

Needs some fun restructuring and added complexity of module projects. Suggestion for new structure:

  • AzAuth.Core - Contains core auth logic and wraps MSAL packages. Will be loaded into custom ALC for isolation. Same as now.
  • AzAuth.Abstractions - New project which will expose an abstract AzAuthGetTokenCmdlet which can be implemented by a PowerShell module through inheritance. This will be published as a Nuget package.
  • AzAuth.PS - Implements AzAuth.Abstractions and its abstract AzAuthGetTokenCmdlet, as well as the cache cmdlets like today. Will instead use a new project to manage loading assemblies, since the AzAuth.Abstractions with the cmdlet must be accessible through by PowerShell (loaded into default ALC)
  • AzAuth.Loader - Managed specific loading of assemblies, uses [ModuleInitializer] to run code when AzAuth.Loader assembly is loaded (because AzAuth may itself be loaded into a custom ALC so it can't load the AzAuth.Abstractions into the current ALC). AzAuth.Abstractions is loaded into default ALC, AzAuth.Core is loaded into custom ALC.

May need tweaking but should work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions