leastprivilege on same-site-fix
Update README.md (compare)
leastprivilege on same-site-fix
fix for SameSite cookies and ot… (compare)
leastprivilege on 2.6.1
leastprivilege on master
udpate version number (compare)
leastprivilege on dev
udpate version number (compare)
leastprivilege on master
include value type when seriali… Update ClientStore.cs fix build script and 1 more (compare)
leastprivilege on dev
Update ClientStore.cs Merge pull request #134 from br… (compare)
leastprivilege on dev
fix build script (compare)
leastprivilege on master
when too many message cookies, … 2.6.3 release Merge branch 'dev' (compare)
leastprivilege on 2.6.3
leastprivilege on dev
2.6.3 release (compare)
brockallen on dev
when too many message cookies, … (compare)
leastprivilege on master
Fix X509 data protector Merge branch 'dev' (compare)
leastprivilege on 2.6.2
leastprivilege on dev
Fix X509 data protector (compare)
I'm trying to add a WebApi controller to a site that serves as my IdentityServer for a few other sites. For some reason I can't get the WebApi with Authorize to work. It keeps returning 401 even when the cookies are passed like normal. The weird and really frustrating part is, I CAN get the same call to work using a regular MVC controller/action with Authorize - but I can't figure out the Cors issues to use that approach for my full implementation.
Has anyone seen this before? It seems like the webapi just isn't recognizing the cookie auth that idsvr adds to the app builder but for some reason the MVC actions do recognize it. Driving me nuts.
I am wondering if there is a way to redirect to another site from within the override of the DefaultViewService.Login.
I was hoping for an easy Response.Redirect. Basically under if the login_hint contains the domain or @ we need to check if the login needs to be redirected to a 3rd party login page.
Or do I need to built out the javascript to do it. Was hoping to not even load our signin page and just go directly to the 3rd party signin page.
Thanks for any help!
public static void ConfigureIdentityServer(this IAppBuilder app, ICormarConfig config)
{
// Create our options
var identityServerOptions = new IdentityServerOptions
{
SiteName = "Cormar API",
SigningCertificate = LoadCertificate(),
IssuerUri = $"{config.AuthorityEndpoint}",
LoggingOptions = new LoggingOptions
{
EnableHttpLogging = true,
EnableWebApiDiagnostics = true,
EnableKatanaLogging = true,
WebApiDiagnosticsIsVerbose = true
},
Factory = new IdentityServerServiceFactory().Configure(config),
Endpoints = new EndpointOptions
{
EnableAccessTokenValidationEndpoint = false
},
// Disable when live
EnableWelcomePage = true
};
// Setup our auth path
app.Map("/identity", idsrvApp => { idsrvApp.UseIdentityServer(identityServerOptions); });
}
I have this weird issue which I can't seem to track down.
2,000 of 500,000 tokens the UPN is missing from the Subject.Claims.
8 of the 500,000 tokens the UPN is missing from both Subject.Claims and AccessToken.Claims.
I am also kinda new to IdentityServer so any sort of clue for me to go look at would be much appreciated.
How to add a custom MVC controller to Identityserver3 owin application
I have an owin app which issues OAuth token to different applications. Which is using IdentityServer3 for issuing tokens. My requirement is I need to implement custom MFA for some of the apps before releasing the token. The MFA controller is a custom implementation and have a custom view. I added an MVC controller in my owin app that contains identityserver3 code, and before release the token, to app, I redirected the user to this controller method. My issue is I am not able to read the user session from the MVC controller. Which should an authenticated controller.
So far I tried is created a controller and register it using IdentityServerServiceFactory. I am not sure whether it is possible to inject an external dependency to the IdentityServer3.
Someone, please help me to resolve this.
public override Task PreAuthenticateAsync(PreAuthenticationContext context)
{
context.SignInMessage.IdP = "myIdp";
context.SignInMessage.LoginHint = "test@test.com";
return base.PreAuthenticateAsync(context);
}
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
{
Notifications = new OpenIdConnectAuthenticationNotifications
{
RedirectToIdentityProvider = (context) =>
{
context.ProtocolMessage.LoginHint = "YEAH@Yeah.com";
return Task.FromResult(0);
}
},
}
Can someone give some guideline on what's happening when a .Net MVC Web API try to validate the bearer token using identityserverbearertokenauthentication middleware. I would like to know the process that's happening in the background. I wan't to enable logging during this process but i'm not sure on enabling the logging for Identity Model library.
Issue:
I’m getting a 401 error and not sure what’s causing the issue. I’ve enabled the Katana logging at the identity server side but I don’t see any entry regarding the bearer token validation.
Current setup.
I’ve a MVC web api protected by identity server 3. I had it working earlier with endpoint as https://local host:4434/api,
I changed the routing parameter to have three extra fields: https://localhost:4434/{param1}/{param2}/{param3}/api.
I would like to know what changes I may need to make at the Identity Server to get the access token validated.
From my postman client - I’m able to get an access token but not able to validate it. Any help will be highly appreciated.
public override Task<Stream> Login(LoginViewModel model, SignInMessage message)
{
//if(model.ErrorMessage == "Invalid Username or password")
if (model.ErrorMessage == "Your Password is expired.")
{
//model.Custom = new
//{
// reenterpassword = "",
// confirmpassword = ""
//};
return base.Render(model, "resetPassword");
}
else
{
model.Custom = new
{
newpassword = "",
confirmpassword = ""
};
return base.Login(model, message);
}
//return base.Login(model, message);
}