identity

How do I pass returnUrl to Login page in Blazor Server application?

倾然丶 夕夏残阳落幕 提交于 2020-06-01 10:55:53
问题 I have a simple Blazor server application, with Identity using Individual Authentication. I created the app from the VS 2019 standard dotnet new template. In some parts of the app I would like to direct the user to the login page, while passing along a returnUrl parameter. I've tried the following variations of code to pass this parameter ( counter is the page I want to return to): NavigationManager.NavigateTo("Identity/Account/Login?returnUrl=counter", forceLoad: true); NavigationManager

SQLite.NET output parameter

陌路散爱 提交于 2020-05-17 06:38:09
问题 I have a object that contains data from a DB. The object has a ID, which in the DB is auto increment field. When creating an object i dont know his ID, until i insert a new record to the DB. Then i want to get back the auto generated value of ID field. I tried to do so by adding a Output parameter, but SQLite.NET throws a NotSupportedException when i try to set the Direction to ParameterDirection.Output . What can i do? The other fields except ID are not unique. A other option is to auto

Change identity of a TFS build agent

喜夏-厌秋 提交于 2020-05-12 11:47:07
问题 We have a TFS build agent that runs integration tests. Some of these tests make calls to web services on the Internet. Our network uses a proxy to talk to the Internet. Since the build agent runs under the identity on Network Service and the settings of Network Service are not configured to use the proxy, the tests fail. How do I do one of the following? Change the identity of the build agent to a domain account Configure Network Service to use the proxy 回答1: To change the identity of the

How to keep the session alive after the browser is closed for 15 minutes using Identity in Core 2.2?

允我心安 提交于 2020-04-10 16:48:02
问题 I have an application written using C# on the top of ASP.NET Core 2.2 framework. I am using Identity to user management and user control. Currently, everytime a user closed his/her browser and open the app again, they are required to log in again. I want to change the login from a session into a cookie that expired after 15 minutes of being inactive. Here is what I have added to the Startup class public void ConfigureServices(IServiceCollection services) { services.AddDbContext

How to keep the session alive after the browser is closed for 15 minutes using Identity in Core 2.2?

被刻印的时光 ゝ 提交于 2020-04-10 16:45:13
问题 I have an application written using C# on the top of ASP.NET Core 2.2 framework. I am using Identity to user management and user control. Currently, everytime a user closed his/her browser and open the app again, they are required to log in again. I want to change the login from a session into a cookie that expired after 15 minutes of being inactive. Here is what I have added to the Startup class public void ConfigureServices(IServiceCollection services) { services.AddDbContext

AD vs ADFS vs LDAP: Explain it like I'm 5

烈酒焚心 提交于 2020-04-09 05:18:32
问题 I don't work with Microsoft but I'm struggling understanding conceptually how AD, ADFS and LDAP work together. Let's say I have an application that needs an Identity Provider. How does AD and LDAP come into play? My googling hasn't come up with a clear summary of these concepts for me, but if there is a resource that exists, please do point me towards it. 回答1: AD and LDAP contain user attributes e.g. first name, last name, phone number. They also contain a user login and password and roles

“is” operator behaves unexpectedly with integers

橙三吉。 提交于 2020-03-28 06:53:10
问题 Why does the following behave unexpectedly in Python? >>> a = 256 >>> b = 256 >>> a is b True # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False # What happened here? Why is this False? >>> 257 is 257 True # Yet the literal numbers compare properly I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100. Based on the above, I can hypothesize that Python is internally implemented such that

SCOPE_IDENTITY的用法

落花浮王杯 提交于 2020-03-13 07:28:08
SCOPE_IDENTITY 和 @@IDENTITY 的作用都是取得返回在当前会话中的任何表内所生成的最后一个标识值,简单的说就是在执行一条插入语句之后使用@@IDENTITY的全局变量,取得插入记录的ID号但是有个问题就是,@@IDENTITY是全局的,所以在他的功能会体现在所有作用域,一个操作,一个触发器,一个存储过程叫做一个作用域,这时候如果出现多个作用域的情况的时候,@@IDENTITY所取得的ID号就是最后一个作用域产生的结果。这时候我们要使用SCOPE_IDENTITY方法来作了。SCOPE_IDENTITY 只返回插入到当前作用域中的值;@@IDENTITY 不受限于特定的作用域。 使用方法:select SCOPE_IDENTITY() as ID from [table]select @@IDENTITY as ID from [table] 实例: sql="SET NOCOUNT ON;insert into [Table](Item) values('"&Item&"')"sql=sql&";select @@IDENTITY as ID from [Table];SET NOCOUNT OFF;" 在插入某些自增表的时候,需要将其打开: 语法:SET IDENTITY_INSERT TableName ON 来源: https://www.cnblogs

IdentityServer4 Identity Resource中的user Claim

↘锁芯ラ 提交于 2020-02-07 01:46:24
Identity Resource 身份资源,里面的UserClaims是用户的一些属性,默认情况下,即使写再多的属性,token中也只会返回sub一个,我们需要在代码中加入 var builder = services.AddIdentityServer() .AddInMemoryIdentityResources(Config.GetIdentityResources()) .AddInMemoryApiResources(Config.Apis) .AddInMemoryClients(Config.Clients) .AddTestUsers(TestUsers.Users) .AddProfileService<ProfileService>(); // not recommended for production - you need to store your key material somewhere secure builder.AddDeveloperSigningCredential(); 然后去实现IProfileService public class ProfileService : IProfileService { protected readonly TestUserStore Users; public ProfileService