This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp2.2</TargetFramework> | |
<IsPackable>false</IsPackable> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.AspNetCore.App" /> | |
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Subject } from 'rxjs'; | |
import { Destroyable } from './destroyable.component'; | |
class TestableDestroyable extends Destroyable { } | |
describe('Destroyable', () => { | |
it('should construct with observable', () => { | |
const component = new TestableDestroyable(); | |
expect(component.destroyed$ instanceof Subject).toBeTruthy(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://stackoverflow.com/a/59702094/419956 by user @chrisvdb cc-by-sa rev 2020.5.28.36925 | |
# Not currently working for me on Ubuntu 20.04 though! | |
[req] | |
default_bits = 2048 | |
default_keyfile = localhost.key | |
distinguished_name = req_distinguished_name | |
req_extensions = req_ext | |
x509_extensions = v3_ca |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Please avoid "password" flow at all cost, it has been officially deprecated | |
// https://tools.ietf.org/html/draft-ietf-oauth-security-topics-15#section-2.4 | |
// But, if you must use it, here's a simple way to do so: | |
async function getTokenResponse(clientId, identityServerUrl, username, password) { | |
const response = await fetch(identityServerUrl + "/connect/token", { | |
method: "POST", | |
headers: { | |
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', | |
}, |
OlderNewer