Comments (4)
@nearlyheadlessarvie, here is a quick implementation for remote authentication using a middleware.
I'm looking into dynamically adding support for remote authentication callbacks based on the options and add the related functions methods
from functions-authorize.
At the moment there's no real need to hook on any events so it's very basic
Btw, its like the moment you read my question there's this idea you had and executed it real quick... and it worked!
You just forgot the await
var handler = handlers.GetHandlerAsync(httpContext, scheme.Name) as IAuthenticationRequestHandler;
from functions-authorize.
Hi @nearlyheadlessarvie,
If you want to execute authentication flows, I think you will need to create your own Authentication middleware replicating ASPNET Cores one, but using the Azure Functions middleware interface. All ASP.NET interfaces you see in ASPNET middleware should be already registered in your services when you called AddAuthentication(...).AddOpenIdConnect(...)
so it should be pretty straight forward.
Can you show your setup?
I think is a great idea to add this functionality to this package.
from functions-authorize.
Also, something to consider is that in the Isolated model, there are 2 processes, Host and your functions. The host process relays request to your functions process using GRPC.
If the function URL does not exist on the host it will never make it to your functions process.
You will have to fake the remote authentication URLs (/signin-oidc, etc...) as http triggered functions, even when they will never be hit as the authentication middleware is the one handling those requests.
from functions-authorize.
Related Issues (20)
- Compatibility with v4? HOT 8
- Getting 401 while executing the function HOT 12
- Configuration["AzureAD:Instance"] HOT 5
- Testing functions using TestServer. HOT 3
- 401 Exception: Bearer was not authenticated. Failure message: IDX10231: Audience validation failed. Delegate returned false HOT 6
- Add support for disabling authorization without removing the [FunctionAuthorize] attribute HOT 7
- Invalid Audience error for JWT Bearer token HOT 6
- Add more coverage to modules HOT 1
- Add support for Isolated hosting model HOT 2
- v4 preview is not handling when scheme is not specified in IAuthorizeData HOT 1
- Function app not returning 401 or 403, but 500 not authenticated
- Not all required components are registered in the ServiceCollection HOT 5
- V4 Isolated receiving 401 when calling function deployed to Azure HOT 1
- Add support for remote authentication flows
- Azure broke auth HOT 15
- Missing built-in authentication schemes HOT 5
- Authentication HOT 23
- Running Azure functions with AAD Authentication broken due to update to the local azure function runtime HOT 2
- removeBuiltInConfig removes options for all JwtBearerOptions, not only for "Bearer" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from functions-authorize.