Skip to content

Instantly share code, notes, and snippets.

View Krzysztof-Cieslak's full-sized avatar
#BlackLivesMatter

Krzysztof Cieślak Krzysztof-Cieslak

#BlackLivesMatter
View GitHub Profile
@Krzysztof-Cieslak
Krzysztof-Cieslak / Users.fs
Created August 3, 2018 22:08
Gists for "Using OAuth with Saturn" blog posts
module Users
open Saturn
open Giraffe
open System.Security.Claims
let matchUpUsers : HttpHandler = fun next ctx ->
// A real implementation would match up user identities with something stored in a database
let isAdmin =
ctx.User.Claims |> Seq.exists (fun claim ->
@Krzysztof-Cieslak
Krzysztof-Cieslak / Program.fs
Last active August 3, 2018 22:08
Gists for "Using OAuth with Saturn" blog posts
module Server
open Saturn
open Config
let endpointPipe = pipeline {
plug head
plug requestId
}
This file has been truncated, but you can view the full file.
'FsAutoComplete.Suave.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'FsAutoComplete.Suave.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'D:\Programowanie\Projekty\Ionide\FsAutoComplete\src\FsAutoComplete.Suave\bin\Debug\FsAutoComplete.Suave.exe'. Symbols loaded.
'FsAutoComplete.Suave.exe' (CLR v4.0.30319: FsAutoComplete.Suave.exe): Loaded 'D:\Programowanie\Projekty\Ionide\FsAutoComplete\src\FsAutoComplete.Suave\bin\Debug\FSharp.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'FsAutoComplete.Suave.exe' (CLR v4.0.30319: FsAutoComplete.Suave.exe): Loaded 'D:\Programowanie\Projekty\Ionide\FsAutoComplete\src\FsAutoComplete.Suave\bin\Debug\Suave.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'FsAutoComplete.Suave.ex
@Krzysztof-Cieslak
Krzysztof-Cieslak / ApplicationManifest.xml
Created March 18, 2016 12:18 — forked from andersosthus/ApplicationManifest.xml
Describes how to secure your OWIN/ASP.NET 5 endpoints in ServiceFabric without having to log on to each VM and do stuff.
<ApplicationManifest>
...
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="SERVICENAME" ServiceManifestVersion="1.0.0" />
<Policies>
<EndpointBindingPolicy CertificateRef="MyCertificateName" EndpointRef="ServiceEndpoint" />
</Policies>
</ServiceManifestImport>
...
<Certificates>