Two integers in Python have same id, but not lists or tuples

Immutable objects don’t have the same id, and as a matter of fact this is not true for any type of objects that you define separately. Generally speaking, every time you define an object in Python, you’ll create a new object with a new identity. However, for the sake of optimization (mostly) there are some … Read more

What is the Signing Credential in IdentityServer4?

The Authorization Server will sign tokens with a key. Resource Server(s) should verify that the token’s integrity with a key. Together they form a (usually asymmetric, e.g. public/private) key (pair). By default IdentityServer will publish the public key for verifying tokens via the /.well-known/openid-configuration endpoint. For development scenarios, you typically want to skip the fuss … Read more

Asp.net Identity password hashing

HEALTH WARNING for the below answer: Know which version of ASP.Net Identity you are using. You should refer to the source code directly if it is one of the newer versions from the github repository. As I write this, the current version (3.0.0-rc1/…/PasswordHasher.cs) of the password handler is significantly different to the below answer. This … Read more

What’s the purpose of `id` function in the FSharp.Core?

When working with higher-order functions (i.e. functions that return other functions and/or take other functions as parameters), you always have to provide something as parameter, but there isn’t always an actual data transformation that you’d want to apply. For example, the function Seq.collect flattens a sequence of sequences, and takes a function that returns the … Read more