Skip to content

Instantly share code, notes, and snippets.

@matjanos
matjanos / jwtissuer_technicalprofile.xml
Last active May 27, 2020 19:50
Refreshing id_tokens in Azure B2C
<TechnicalProfile Id="JwtIssuer">
<DisplayName>JWT Issuer</DisplayName>
<Protocol Name="None" />
<OutputTokenFormat>JWT</OutputTokenFormat>
<Metadata>
<Item Key="client_id">{service:te}</Item>
<Item Key="token_lifetime_secs">##TOKEN_EXPIRY_IN_SEC##</Item>
<Item Key="id_token_lifetime_secs">##TOKEN_EXPIRY_IN_SEC##</Item>
<Item Key="refresh_token_lifetime_secs">##SESSION_EXPIRY_IN_SEC##</Item>
<Item Key="rolling_refresh_token_lifetime_secs">7776000</Item>
"JSON Property":{
"prefix": "jsonp",
"description": "JSON Property",
"body": ["[JsonProperty(\"${1:name}\")]", "public ${0:type} ${1/(^.)/${0:/capitalize}/gi} { get; set; }"]
}
public interface ICommandHandler<T> where T : ICommand
{
Task HandleAsync (T command);
}
////////////////////////////////////////////////////
class CommandDispatcher : ICommandDispatcher
{
private readonly IComponentContext _context;
public CommandDispatcher (IComponentContext componentContext)
@matjanos
matjanos / Program.cs
Created December 14, 2016 21:52
DevStyle - konkurs
using System;
using System.IO;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello DevStyle!");
FileStream textStream = File.Open("test.txt",FileMode.Open);