Code Monkey home page Code Monkey logo

blazor.bff.openidconnect.template's Introduction

Blazor.BFF.OpenIDConnect.Template

.NET NuGet Status Change log

This template can be used to create a Blazor WASM application hosted in an ASP.NET Core Web app using OpenID Connect to authenticate using the BFF security architecture. (server authentication) This removes the tokens form the browser and uses cookies with each HTTP request, response. The template also adds the required security headers as best it can for a Blazor application.

Blazor BFF OpenID Connect

Features

  • WASM hosted in ASP.NET Core 6
  • BFF with OpenID Connect
  • OAuth2 and OpenID Connect OIDC
  • No tokens in the browser

Other templates

Blazor BFF Azure AD

Blazor BFF Azure B2C

Using the template

install

dotnet new -i Blazor.BFF.OpenIDConnect.Template

run

dotnet new blazorbffoidc -n YourCompany.Bff

Use the -n or --name parameter to change the name of the output created. This string is also used to substitute the namespace name in the .cs file for the project.

Setup after installation

Add the OpenID Connect registration settings

"OpenIDConnectSettings": {
    "Authority": "--your-authority--",
    "ClientId": "--client ID--",
    "ClientSecret": "--client-secret (user secrets)--"
},

uninstall

dotnet new -u Blazor.BFF.OpenIDConnect.Template

Development

build

https://docs.microsoft.com/en-us/dotnet/core/tutorials/create-custom-template

nuget pack content/Blazor.BFF.OpenIDConnect.Template.nuspec

install developement

Locally built nupkg:

dotnet new -i Blazor.BFF.OpenIDConnect.Template.1.0.7.nupkg

Local folder:

dotnet new -i <PATH>

Where <PATH> is the path to the folder containing .template.config.

Credits, Used NuGet packages + ASP.NET Core 6.0 standard packages

  • NetEscapades.AspNetCore.SecurityHeaders
  • IdentityModel.AspNetCore

Links

https://documentation.openiddict.com/

https://auth0.com/

https://www.keycloak.org/

https://github.com/andrewlock/NetEscapades.AspNetCore.SecurityHeaders

blazor.bff.openidconnect.template's People

Contributors

damienbod 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.