Comments (4)
First of all: Could you post a bit more of your solution? Just by what you're saying I'm having a hard time to see where the issue is.
Some clues:
- have you triggered authentication yet?
- is the NTLM auth middleware at the right place in the OWIN pipeline (before any application level middleware that actually answers requests)?
from pysco68.owin.authentication.ntlm.
Hey , what do you mean by "have you triggered authentication yet?" do you mean that just with the default setup it does not ask for credentials ?
And I have to do that check everytime someone calls my api ? => if (this.User == null)
{
var ap = new AuthenticationProperties()
{
RedirectUri = redirectUrl
};
var context = this.Request.GetContext();
context.Authentication.Challenge(ap, NtlmAuthenticationDefaults.AuthenticationType);
return Unauthorized();
}
Btw tyvm for the fast response !
from pysco68.owin.authentication.ntlm.
Well, as I said I don't know much about your setup.
It is common practice among OWIN Authentication middlewares to wait for a challenge before taking action. This means that if your controller / Nancy application does not require for authentication, then nothing will happen.
To be honest, I didn't try my middleware with Nancy. In ASP.NET MVC / WebAPI you define a per-controller/per-route authorization attribute or insert a small middleware that does so somewhere in the pipeline (usually before any business level controller are being handled).
Maybe this can help you a bit: https://github.com/NancyFx/Nancy/wiki/Authentication-overview
from pysco68.owin.authentication.ntlm.
Any update on this? If your problem's resolved, please close this issue. I will do so upon no answer in the next 30 days.
Best regards,
Yannic
from pysco68.owin.authentication.ntlm.
Related Issues (16)
- CallbackPath check fails when BasePath is not /
- Prompted for credentials HOT 1
- Authorization header always missing HOT 8
- You should port to .net core HOT 1
- IOwinRequest in OnCreateIdentity callback HOT 2
- Why Owin.Extensions and Owin.Types are referenced? HOT 2
- Configuration of CallbackPath not working as expected HOT 2
- The identity in RequestContext.Principal.Identity does not provide domain name HOT 5
- NTLM authentication works well on IIS Express (Visual Studio) but fails on IIS. HOT 4
- HandshakeState.IsClientResponseValid failed while accesing specific domain instead localhost
- when to send challenge with SignalR? HOT 2
- Feature request: give me a hook for rejecting particular users HOT 5
- possible to use token instead of cookie? HOT 1
- Virtual Directory CallbackPath HOT 6
- Sample using this Nuget package 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 pysco68.owin.authentication.ntlm.