Coder Social home page Coder Social logo

lombiq / setup-extensions Goto Github PK

View Code? Open in Web Editor NEW
4.0 13.0 2.0 65 KB

.NET Core project with useful extensions for setting up an Orchard Core application.

License: BSD 3-Clause "New" or "Revised" License

C# 100.00%
orchard-cms orchard orchard-core orchard-module dotnet dotnet-core

setup-extensions's Introduction

Lombiq Setup Extensions for Orchard Core

Lombiq.SetupExtensions NuGet

About

Extensions for setting up an Orchard Core application.

Do you want to quickly try out this project and see it in action? Check it out in our Open-Source Orchard Core Extensions full Orchard Core solution and also see our other useful Orchard Core-related open-source projects!

Features

Logged in user authentication for API requests

A service configuration that will authenticate every API request to be able to run the setup even for the Default tenant (when the application is configured to do so). This way you'll be able to set up a fresh Orchard app's first (Default) tenant via an API call.

This is achieved by using one of the extension methods in the applications's Startup class:

    public class Startup
    {
        private readonly IConfiguration _configuration;


        public Startup(IConfiguration configuration) => _configuration = configuration;


        public void ConfigureServices(IServiceCollection services)
        {
            // Use either one of the below options:

            // Set it up via an AddOrchardCms() argument.
            services.AddOrchardCms(builder => builder.AuthorizeApiRequestsIfEnabled(_configuration));

            // Enable it based on your own logic:
            services.AddOrchardCms(builder =>
            {
                if (...)
                {
                    builder.AuthorizeApiRequests(_configuration); 
                }
            });
        }

        // Rest of the class.
    }

When starting the application, the AuthorizeOrchardApiRequests setting has to be set to true either in the launch settings or when starting the application through the dotnet CLI. Without this setting, API requests will be authenticated as usual, so it's safe to run/deploy the application with this project as long as the setting above is not set to true.

Example: dotnet Lombiq.AwesomeApp.dll --AuthorizeOrchardApiRequests true.

You can use the Reset-OrchardCoreApp script from the Utility Scripts project to quickly reset and reinstall a local Orchard Core app configured with this.

Contribution and support

Bug reports, feature requests, comments, questions, code contributions and love letters are warmly welcome. You can send them to us via GitHub issues and pull requests. Please adhere to our open-source guidelines while doing so.

This project is developed by Lombiq Technologies. Commercial-grade support is available through Lombiq.

setup-extensions's People

Contributors

0liver avatar barthamark avatar benedekfarkas avatar demeszabolcs avatar dministro avatar domonkosgabor avatar luko6 avatar mzole avatar piedone avatar porgabi avatar psichorex avatar sarahelsaig avatar wasnk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.