Click here to Skip to main content
15,891,253 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Socket TCP - Change the client class to send the file, and the server receives the file. Pin
Richard MacCutchan22-Oct-18 21:37
mveRichard MacCutchan22-Oct-18 21:37 
QuestionCheque printing in winforms application using C# dotnet Pin
ccrenil20-Oct-18 1:43
ccrenil20-Oct-18 1:43 
AnswerRe: Cheque printing in winforms application using C# dotnet Pin
Afzaal Ahmad Zeeshan20-Oct-18 3:21
professionalAfzaal Ahmad Zeeshan20-Oct-18 3:21 
QuestionVery slow code in bar code reading Pin
Ali Alshihry19-Oct-18 14:57
Ali Alshihry19-Oct-18 14:57 
AnswerRe: Very slow code in bar code reading Pin
Dave Kreskowiak19-Oct-18 15:33
mveDave Kreskowiak19-Oct-18 15:33 
GeneralRe: Very slow code in bar code reading Pin
Ali Alshihry19-Oct-18 15:44
Ali Alshihry19-Oct-18 15:44 
GeneralRe: Very slow code in bar code reading Pin
Dave Kreskowiak19-Oct-18 15:58
mveDave Kreskowiak19-Oct-18 15:58 
Generalc# Identity Server 3: Set different Refresh Token Expiration for a specific user Pin
Member 1402363617-Oct-18 14:23
Member 1402363617-Oct-18 14:23 
I have the following setup:

Client: AngularJS Web App
Server: ASP.NET Web API

In the server I use the IdentityFramework3 to authenticate users on my AngularJS Client that has the (oidc-token-manager) configured.

Currently I'm setting the AbsoluteRefreshTokenLifetime to 48 hours for my Client MyAngularJsApp like so:
C#
new Client
{
	Enabled = true,
	ClientId = MyAngularJsApp.Id,
	ClientUri = MyAngularJsApp.Uri,
	ClientName = MyAngularJsApp.Name,
	Flow = Flows.Implicit,
	AllowAccessToAllScopes = true,
	IdentityTokenLifetime = 300,
	AccessTokenLifetime = 3600,
	RefreshTokenExpiration = TokenExpiration.Absolute,
	RefreshTokenUsage = TokenUsage.ReUse,
	AbsoluteRefreshTokenLifetime = TimeSpan.FromDays(2).Seconds,
	RequireConsent = false,
	RedirectUris = new List<string>
	{
		MyAngularJsApp.Uri + "/assets/idSrv/callback.html",
		MyAngularJsApp.Uri + "/assets/idSrv/silentrefreshframe.html"
	},
	PostLogoutRedirectUris = new List<string>
	{
		MyAngularJsApp.Uri + "/index.html"
	}
}
There is one specific user that will log into my client that I want to set his Refresh Token to last 100 days so that the user does not have to Authenticate in 100 days, the reason I need this specific user to have 100 days without needing to log in is because this user will be used to display a specific part of the app on a big monitor, it'll remain static for 100 days
C#
AbsoluteRefreshTokenLifetime = TimeSpan.FromDays(100).Seconds
How do I make it so that only this user has this refresh token lifetime?

[Edit]Reformatted the question so that it wasn't all inside one pre block.

modified 18-Oct-18 2:49am.

QuestionApplication service with C#. Pin
Member 1401973516-Oct-18 20:55
Member 1401973516-Oct-18 20:55 
AnswerRe: Application service with C#. Pin
OriginalGriff16-Oct-18 21:16
mveOriginalGriff16-Oct-18 21:16 
GeneralRe: Application service with C#. Pin
Member 1401973516-Oct-18 22:09
Member 1401973516-Oct-18 22:09 
GeneralRe: Application service with C#. Pin
OriginalGriff16-Oct-18 22:13
mveOriginalGriff16-Oct-18 22:13 
GeneralRe: Application service with C#. Pin
Member 1401973516-Oct-18 22:46
Member 1401973516-Oct-18 22:46 
GeneralRe: Application service with C#. Pin
OriginalGriff16-Oct-18 23:02
mveOriginalGriff16-Oct-18 23:02 
GeneralRe: Application service with C#. Pin
Pete O'Hanlon16-Oct-18 23:59
mvePete O'Hanlon16-Oct-18 23:59 
AnswerRe: Application service with C#. Pin
#realJSOP22-Oct-18 9:03
mve#realJSOP22-Oct-18 9:03 
QuestionHow can I make my code modular? Pin
George Bradley16-Oct-18 12:43
George Bradley16-Oct-18 12:43 
AnswerRe: How can I make my code modular? Pin
V.16-Oct-18 18:44
professionalV.16-Oct-18 18:44 
GeneralRe: How can I make my code modular? Pin
henrydevid127-Oct-18 11:56
henrydevid127-Oct-18 11:56 
AnswerRe: How can I make my code modular? Pin
#realJSOP24-Oct-18 1:42
mve#realJSOP24-Oct-18 1:42 
AnswerRe: How can I make my code modular? Pin
josda100026-Oct-18 18:29
josda100026-Oct-18 18:29 
GeneralRe: How can I make my code modular? Pin
josda100027-Oct-18 2:48
josda100027-Oct-18 2:48 
QuestionImagelist in Tabcontrol - Image selection Pin
RAFENS15-Oct-18 23:47
RAFENS15-Oct-18 23:47 
AnswerRe: Imagelist in Tabcontrol - Image selection Pin
BillWoodruff19-Oct-18 2:49
professionalBillWoodruff19-Oct-18 2:49 
QuestionImage processing in c# Pin
Member 1401942314-Oct-18 10:51
Member 1401942314-Oct-18 10:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.