اشتراکها
NET MAUI Preview 5. منتشر شد
اشتراکها
NET Core 2.1.2 SDK. منتشر شد
This updated of the SDK includes the previously released .NET Core 2.0.3 Runtime.
| SDK Installer | SDK Binaries | Runtime Installer | Runtime Binaries |
---|---|---|---|---|
Windows | 32-bit / 64-bit | 32-bit / 64-bit | 32-bit / 64-bit | 32-bit / 64-bit |
macOS | 64-bit | 64-bit | 64-bit | 64-bit |
Linux * | See installations steps below | 64-bit | - | 64-bit |
Impersonation Process
Impersonation is when an admin user is logged in with the same privileges as a user, but without knowing their password or other credentials. I’ve used this in couple applications and it was invaluable for support cases and debugging user permissions.
[Authorize(Roles = "Admin")] // <-- Make sure only admins can access this public async Task<IActionResult> ImpersonateUser(String userId) { var currentUserId = User.GetUserId(); var impersonatedUser = await _userManager.FindByIdAsync(userId); var userPrincipal = await _signInManager.CreateUserPrincipalAsync(impersonatedUser); userPrincipal.Identities.First().AddClaim(new Claim("OriginalUserId", currentUserId)); userPrincipal.Identities.First().AddClaim(new Claim("IsImpersonating", "true")); // sign out the current user await _signInManager.SignOutAsync(); await HttpContext.Authentication.SignInAsync(cookieOptions.ApplicationCookieAuthenticationScheme, userPrincipal); return RedirectToAction("Index", "Home"); }
اشتراکها
ویدیوهای کنفرانس NDC 2014
اشتراکها
پروژهی Silver
Silver is a free implementation of Apple's Swift programming language.
With Silver, you can use Swift to write code directly against the .NET, Java, Android and Cocoa APIs. And you can also share a lot of non-UI code between platforms.