update demo with token auth

This commit is contained in:
Shmew
2020-09-20 19:14:26 -05:00
parent 7092ce1864
commit dcc153409a
12 changed files with 385 additions and 7 deletions

View File

@@ -11,7 +11,25 @@ module App =
type Bulma = CssClasses<"https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css", Naming.PascalCase>
type Hub = StreamHub.ServerToClient<Action,StreamFrom.Action,Response,StreamFrom.Response>
module Api =
open Fable.Remoting.Client
let private api =
Remoting.createApi()
|> Remoting.withRouteBuilder Api.path
|> Remoting.buildProxy<Api.IApi>
let login () =
async {
let! res = api.login "admin" "admin"
return
match res with
| Ok res -> res
| Error e -> failwithf "Authentication failed: %s" e
}
let private graph = React.functionComponent(fun (input: {| dates: System.DateTime list; lows: float list; highs: float list |}) ->
Plotly.plot [
plot.traces [
@@ -220,7 +238,7 @@ module App =
let hub =
React.useSignalR<Action,StreamFrom.Action,Response,StreamFrom.Response> <| fun hub ->
hub.withUrl(Endpoints.Root)
hub.withUrl(Endpoints.Root, fun builder -> builder.accessTokenFactory Api.login)
.withAutomaticReconnect()
.configureLogging(LogLevel.Debug)
.useMessagePack()

View File

@@ -2,6 +2,7 @@ group Client
Fable.Browser.Dom
Fable.Core
Fable.Promise
Fable.Remoting.Client
Feliz
Feliz.Plotly
FSharp.Core

57
demo/Server/Api.fs Normal file
View File

@@ -0,0 +1,57 @@
namespace SignalRApp
module Api =
open Fable.Remoting.Server
open Fable.Remoting.Giraffe
open Giraffe
open Microsoft.AspNetCore.Http
open Microsoft.Extensions.DependencyInjection
open Microsoft.FSharp.Quotations
open Saturn
open SignalRApp.Api
let getRoute<'u> (basePath: string) (expr: Expr<IApi -> Async<'u>>) =
match expr with
| Patterns.ProxyLambda (name, []) ->
Api.path () name |> sprintf "%s%s" basePath
| _ -> failwithf "Invalid path given for quotation: %A" expr
let private auth : Reader<HttpContext,string -> string -> Async<Result<string,string>>> =
reader {
let! ctx = resolve<HttpContext>()
let issuer = ctx.RequestServices.GetRequiredService<Auth.JwtIssuer>()
return
fun username password ->
async {
let id = username.GetHashCode() |> string
if username <> "admin" || password <> "admin" then
return Error "Invalid credentials"
else
return!
async {
let! token =
Auth.Token.generateClaimsIdentity username id
|> Auth.Token.generateEncodedToken issuer username
return Ok token
}
}
}
let private api : Reader<HttpContext,IApi> =
reader {
let! _ = resolve<HttpContext>()
let! auth = auth
return {
login = auth
}
}
let router : HttpHandler =
Remoting.createApi()
|> Remoting.fromReader api
|> Remoting.withRouteBuilder Api.path
|> Remoting.buildHttpHandler

View File

@@ -2,10 +2,29 @@ namespace SignalRApp
module App =
open Fable.SignalR
open Microsoft.AspNetCore.Builder
open Microsoft.Extensions.DependencyInjection
open Microsoft.Extensions.Logging
open Saturn
open System
module Setup =
open SignalRApp.Auth
let url = sprintf "http://0.0.0.0:%i/" <| Env.getPortsOrDefault 8085us
let jwtIssuer =
{ Audience = sprintf "http://localhost:%i" <| Env.getPortsOrDefault 8085us
Issuer = "SignalRApp Api"
NotBefore = DateTime.Now
RequiredHttpsMetadata = false
ValidFor = TimeSpan.FromDays(1.) }
|> JwtIssuer.create
let services (services: IServiceCollection) =
services
|> Ticker.Create
[<EntryPoint>]
let main args =
try
@@ -17,12 +36,22 @@ module App =
send SignalRHub.send
invoke SignalRHub.invoke
stream_from SignalRHub.Stream.sendToClient
use_bearer_auth
with_after_routing (fun builder ->
builder
.UseAuthentication()
.UseAuthorization()
)
with_endpoint_config (fun builder ->
builder.RequireAuthorization()
)
use_messagepack
}
)
service_config Ticker.Create
url (sprintf "http://0.0.0.0:%i/" <| Env.getPortsOrDefault 8085us)
no_router
config_auth Setup.jwtIssuer
service_config Setup.services
url Setup.url
use_router Api.router
use_static (Env.clientPath args)
use_developer_exceptions
}

140
demo/Server/Auth.fs Normal file
View File

@@ -0,0 +1,140 @@
namespace SignalRApp
open System
open System.Security.Claims
open System.Security.Principal
[<AutoOpen>]
module Extensions =
type ClaimsIdentity with
member this.TryFindFirst (claimsIdentifier: string) =
try
match this.FindFirst(claimsIdentifier) with
| null -> None
| claim -> Some claim
with _ -> None
[<RequireQualifiedAccess>]
module Claim =
let value (claim: Claim) = claim.Value
[<RequireQualifiedAccess>]
module DateTime =
let asClaimValue (d: DateTime) = d.Ticks |> string
module Auth =
open Giraffe
open Microsoft.AspNetCore.Authorization
open Microsoft.AspNetCore.Authentication.JwtBearer
open Microsoft.IdentityModel.Tokens
open System.IdentityModel.Tokens.Jwt
type JwtIssuerOptions =
{ Audience: string
Issuer: string
NotBefore: DateTime
RequiredHttpsMetadata: bool
ValidFor: TimeSpan }
[<NoComparison>]
type JwtIssuer =
{ Audience: string
Issuer: string
NotBefore: DateTime
RequiredHttpsMetadata: bool
SigningCredentials: SigningCredentials
ValidFor: TimeSpan }
member this.Expiration (issuedAt: DateTime) = issuedAt |> fun d -> d.Add(this.ValidFor)
member this.TokenValidationParameters =
TokenValidationParameters()
|> fun opts ->
opts.ValidateIssuer <- true
opts.ValidIssuer <- this.Issuer
opts.ValidateAudience <- false
opts.ValidAudience <- this.Audience
opts.ValidateIssuerSigningKey <- true
opts.IssuerSigningKey <- this.SigningCredentials.Key
opts.RequireExpirationTime <- true
opts.ValidateLifetime <- true
opts.ClockSkew <- TimeSpan.Zero
opts
[<RequireQualifiedAccess>]
module JwtIssuer =
let create (options: JwtIssuerOptions) =
let key = System.Text.Encoding.UTF8.GetBytes(Guid.NewGuid() |> string)
{ Audience = options.Audience
Issuer = options.Issuer
NotBefore = options.NotBefore
RequiredHttpsMetadata = options.RequiredHttpsMetadata
SigningCredentials = SigningCredentials(SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha512)
ValidFor = options.ValidFor }
[<RequireQualifiedAccess>]
module Token =
[<RequireQualifiedAccess>]
module ClaimsIdentifier =
let [<Literal>] Rol = "rol"
let [<Literal>] Id = "id"
[<RequireQualifiedAccess>]
module AppClaims =
let [<Literal>] HubAccess = "hub_access"
let private generateJti () =
async { return {| token = Guid.NewGuid() |> string; issuedAt = DateTime.Now |} }
let generateEncodedToken (options: JwtIssuer) (username: string) (identity: ClaimsIdentity) =
async {
let! jti = generateJti()
let claims = [
Claim (JwtRegisteredClaimNames.Sub, username)
Claim (JwtRegisteredClaimNames.Jti, jti.token)
Claim (JwtRegisteredClaimNames.Iat, jti.issuedAt |> DateTime.asClaimValue, ClaimValueTypes.Integer64)
yield! [
identity.TryFindFirst ClaimsIdentifier.Rol
identity.TryFindFirst ClaimsIdentifier.Id
] |> List.choose id
]
return
JwtSecurityToken (
issuer = options.Issuer,
audience = options.Audience,
claims = claims,
notBefore = Nullable options.NotBefore,
expires = Nullable (options.Expiration jti.issuedAt),
signingCredentials = options.SigningCredentials
)
|> JwtSecurityTokenHandler().WriteToken
}
let generateClaimsIdentity (username: string) (id: string) =
ClaimsIdentity (GenericIdentity(username, "Token"), [
Claim (ClaimsIdentifier.Id, id)
Claim (ClaimsIdentifier.Rol, AppClaims.HubAccess)
])
[<RequireQualifiedAccess>]
module Jwt =
let policy =
let policy = AuthorizationPolicyBuilder()
policy.AuthenticationSchemes.Add(JwtBearerDefaults.AuthenticationScheme)
policy
.RequireClaim(Token.ClaimsIdentifier.Rol, "hub_access")
.Build()
let authorize : HttpHandler =
text "UNAUTHORIZED - JWT"
|> RequestErrors.unauthorized JwtBearerDefaults.AuthenticationScheme "SignalRApp"
|> authorizeByPolicy policy
let authenticate : HttpHandler =
requiresAuthentication <| challenge JwtBearerDefaults.AuthenticationScheme

View File

@@ -0,0 +1,28 @@
namespace Saturn
[<AutoOpen>]
module Extensions =
open Microsoft.AspNetCore.Authentication.JwtBearer
open Microsoft.Extensions.DependencyInjection
open SignalRApp
type Saturn.Application.ApplicationBuilder with
[<CustomOperation("config_auth")>]
member this.UseAuth(state, issuer: Auth.JwtIssuer) =
this.ServiceConfig(state, fun services ->
services
.AddSingleton<Auth.JwtIssuer>(issuer)
.AddAuthentication(fun opts ->
opts.DefaultAuthenticateScheme <- JwtBearerDefaults.AuthenticationScheme
opts.DefaultChallengeScheme <- JwtBearerDefaults.AuthenticationScheme
)
.AddJwtBearer(fun opts ->
opts.SaveToken <- true
opts.Audience <- issuer.Audience
opts.TokenValidationParameters <- issuer.TokenValidationParameters
opts.RequireHttpsMetadata <- false
).Services
.AddAuthorization(fun opts ->
opts.AddPolicy("SignalR Auth", Auth.Jwt.policy)
)
)

View File

@@ -8,6 +8,9 @@
</PropertyGroup>
<ItemGroup>
<None Include="Data\apple.csv" />
<Compile Include="Auth.fs" />
<Compile Include="SaturnExtensions.fs" />
<Compile Include="Api.fs" />
<Compile Include="Stocks.fs" />
<Compile Include="Ticker.fs" />
<Compile Include="SignalR.fs" />

View File

@@ -1,4 +1,5 @@
group Server
Fable.Remoting.Giraffe
FSharp.Core
FSharp.Control.AsyncSeq
FSharp.Data

View File

@@ -29,3 +29,9 @@ module SignalRHub =
module Endpoints =
let [<Literal>] Root = "/SignalR"
module Api =
let path _ (method: string) = "/Api/" + method
type IApi =
{ login: string -> string -> Async<Result<string,string>> }

View File

@@ -87,6 +87,7 @@ group Client
nuget Fable.Core ~> 3
nuget Fable.Promise ~> 2
nuget Fable.Remoting.Client ~> 6
nuget Feliz ~> 1
nuget Feliz.Plotly ~> 1
nuget FSharp.Core ~> 4.7
@@ -96,6 +97,7 @@ group Server
source https://nuget.org/api/v2
source https://api.nuget.org/v3/index.json
nuget Fable.Remoting.Giraffe ~> 4
nuget FSharp.Control.AsyncSeq ~> 2
nuget FSharp.Core ~> 4.7
nuget FSharp.Data ~> 3

View File

@@ -171,8 +171,16 @@ NUGET
Fable.Browser.Event (>= 1.0) - restriction: >= netstandard2.0
Fable.Core (>= 3.0) - restriction: >= netstandard2.0
FSharp.Core (>= 4.5.2) - restriction: >= netstandard2.0
Fable.Browser.XMLHttpRequest (1.1.2) - restriction: >= netstandard2.0
Fable.Browser.Blob (>= 1.1) - restriction: >= netstandard2.0
Fable.Browser.Event (>= 1.2.1) - restriction: >= netstandard2.0
Fable.Core (>= 3.0) - restriction: >= netstandard2.0
FSharp.Core (>= 4.7) - restriction: >= netstandard2.0
Fable.Core (3.1.5)
FSharp.Core (>= 4.7) - restriction: >= netstandard2.0
Fable.Parsimmon (4.1) - restriction: >= netstandard2.0
Fable.Core (>= 3.0) - restriction: >= netstandard2.0
FSharp.Core (>= 4.6.2) - restriction: >= netstandard2.0
Fable.Promise (2.1)
Fable.Core (>= 3.1.5) - restriction: >= netstandard2.0
FSharp.Core (>= 4.7) - restriction: >= netstandard2.0
@@ -180,6 +188,19 @@ NUGET
Fable.Browser.Dom (>= 2.0.1) - restriction: >= netstandard2.0
Fable.Core (>= 3.1.5) - restriction: >= netstandard2.0
FSharp.Core (>= 4.7.1) - restriction: >= netstandard2.0
Fable.Remoting.Client (6.7)
Fable.Browser.XMLHttpRequest (>= 1.0) - restriction: >= netstandard2.0
Fable.Core (>= 3.1.5) - restriction: >= netstandard2.0
Fable.Remoting.MsgPack (>= 1.4) - restriction: >= netstandard2.0
Fable.SimpleJson (>= 3.11) - restriction: >= netstandard2.0
FSharp.Core (>= 4.7) - restriction: >= netstandard2.0
Fable.Remoting.MsgPack (1.4) - restriction: >= netstandard2.0
FSharp.Core (>= 4.6.2) - restriction: || (&& (>= net45) (< netstandard2.0)) (&& (< net45) (>= netstandard2.0)) (>= net462) (>= netcoreapp3.1)
TypeShape (>= 8.0.1) - restriction: || (&& (>= net45) (< netstandard2.0)) (&& (< net45) (>= netstandard2.0)) (>= net462) (>= netcoreapp3.1)
Fable.SimpleJson (3.11) - restriction: >= netstandard2.0
Fable.Core (>= 3.1.5) - restriction: >= netstandard2.0
Fable.Parsimmon (>= 4.0) - restriction: >= netstandard2.0
FSharp.Core (>= 4.7) - restriction: >= netstandard2.0
Feliz (1.13.2)
Fable.Core (>= 3.1.5) - restriction: >= netstandard2.0
Fable.React (>= 7.0.1) - restriction: >= netstandard2.0
@@ -190,6 +211,56 @@ NUGET
Feliz (>= 1.13.1 < 2.0)
FSharp.Core (>= 4.7.2 < 5.0)
FSharp.Core (4.7.2)
Microsoft.NETCore.Platforms (3.1.3) - restriction: || (&& (>= netcoreapp3.1) (< netstandard1.2)) (&& (>= netcoreapp3.1) (< netstandard1.3)) (&& (>= netcoreapp3.1) (< netstandard1.5)) (&& (>= netcoreapp3.1) (< netstandard2.0)) (>= netcoreapp5.0)
Microsoft.NETCore.Targets (3.1) - restriction: || (&& (>= netcoreapp3.1) (< netstandard1.2)) (&& (>= netcoreapp3.1) (< netstandard1.3)) (&& (>= netcoreapp3.1) (< netstandard1.5)) (&& (>= netcoreapp3.1) (< netstandard2.0)) (>= netcoreapp5.0)
System.Globalization (4.3) - restriction: || (&& (>= netcoreapp3.1) (< netstandard2.0)) (>= netcoreapp5.0)
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0)
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0)
System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0)
System.IO (4.3) - restriction: || (&& (>= netcoreapp3.1) (< netstandard1.3)) (&& (>= netcoreapp3.1) (< netstandard1.5)) (&& (>= netcoreapp3.1) (< netstandard2.0)) (>= netcoreapp5.0)
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
System.Reflection (4.3) - restriction: || (&& (>= netcoreapp3.1) (< netstandard2.0)) (>= netcoreapp5.0)
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
System.Reflection.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac)) (&& (< netcoreapp2.0) (>= netcoreapp3.1) (< netstandard2.1)) (&& (>= netcoreapp3.1) (< netstandard2.0)) (&& (>= netcoreapp3.1) (< portable-net45+wp8)) (&& (>= netcoreapp3.1) (>= uap10.1)) (>= netcoreapp5.0) (&& (>= netstandard2.0) (< portable-net45+wp8) (>= win8)) (&& (>= netstandard2.0) (< portable-net45+wp8) (< win8)) (&& (>= netstandard2.0) (>= uap10.1))
System.Reflection.Emit.Lightweight (4.7) - restriction: || (&& (< net45) (>= netstandard2.0)) (>= netcoreapp3.1)
System.Reflection (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wp8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wp8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac)) (>= netcoreapp5.0) (&& (< netstandard2.0) (>= wpa81)) (&& (>= portable-net45+win8+wp8+wpa81) (< portable-net45+wp8) (< win8)) (&& (< portable-net45+wp8) (>= win8)) (>= uap10.1)
System.Reflection.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wp8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wp8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wp8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
System.Reflection.Primitives (4.3) - restriction: || (&& (>= netcoreapp3.1) (< netstandard2.0)) (>= netcoreapp5.0)
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
System.Resources.ResourceManager (4.3) - restriction: || (&& (>= netcoreapp3.1) (< netstandard2.0)) (>= netcoreapp5.0)
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
System.Globalization (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
System.Reflection (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
System.Runtime (4.3.1) - restriction: || (&& (>= netcoreapp3.1) (< netstandard2.0)) (>= netcoreapp5.0)
Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= netcoreapp5.0)
System.Text.Encoding (4.3) - restriction: || (&& (>= netcoreapp3.1) (< netstandard1.3)) (&& (>= netcoreapp3.1) (< netstandard1.5)) (&& (>= netcoreapp3.1) (< netstandard2.0)) (>= netcoreapp5.0)
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0)
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0)
System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0)
System.Threading.Tasks (4.3) - restriction: || (&& (>= netcoreapp3.1) (< netstandard1.3)) (&& (>= netcoreapp3.1) (< netstandard1.5)) (&& (>= netcoreapp3.1) (< netstandard2.0)) (>= netcoreapp5.0)
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0)
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0)
System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (>= netcoreapp5.0)
TypeShape (8.0.1) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (>= netcoreapp3.1)
FSharp.Core (>= 3.1.2) - restriction: >= net45
FSharp.Core (>= 4.3.4) - restriction: && (< net45) (>= netstandard2.0)
System.Reflection.Emit.Lightweight (>= 4.3) - restriction: && (< net45) (>= netstandard2.0)
Zanaptak.TypedCssClasses (0.4)
FSharp.Core (>= 4.3.4) - restriction: >= netstandard2.0
@@ -2337,6 +2408,21 @@ NUGET
GROUP Server
NUGET
remote: https://www.nuget.org/api/v2
Fable.Remoting.Giraffe (4.9)
Fable.Remoting.Server (>= 5.9) - restriction: >= netstandard2.0
FSharp.Core (>= 4.6.2) - restriction: >= netstandard2.0
Giraffe (>= 3.6) - restriction: >= netstandard2.0
Fable.Remoting.Json (2.12) - restriction: >= netstandard2.0
FSharp.Core (>= 4.6.2) - restriction: || (>= net45) (>= netstandard2.0)
Newtonsoft.Json (>= 12.0.2) - restriction: || (>= net45) (>= netstandard2.0)
Fable.Remoting.MsgPack (1.4) - restriction: >= netstandard2.0
FSharp.Core (>= 4.6.2) - restriction: || (&& (>= net45) (< netstandard2.0)) (&& (< net45) (>= netstandard2.0)) (>= net462) (>= netcoreapp3.1)
TypeShape (>= 8.0.1) - restriction: || (&& (>= net45) (< netstandard2.0)) (&& (< net45) (>= netstandard2.0)) (>= net462) (>= netcoreapp3.1)
Fable.Remoting.Server (5.9) - restriction: >= netstandard2.0
Fable.Remoting.Json (>= 2.12) - restriction: || (>= net462) (>= netstandard2.0)
Fable.Remoting.MsgPack (>= 1.4) - restriction: || (>= net462) (>= netstandard2.0)
FSharp.Core (>= 4.6.2) - restriction: || (>= net462) (>= netstandard2.0)
TypeShape (>= 8.0.1) - restriction: || (>= net462) (>= netstandard2.0)
FSharp.Control.AsyncSeq (2.0.24)
FSharp.Core (>= 3.1.2) - restriction: >= net45
FSharp.Core (>= 4.3.2) - restriction: && (< net45) (>= netstandard2.0)
@@ -2347,7 +2433,7 @@ NUGET
FSharp.Data (3.3.3)
FSharp.Core (>= 4.0.0.1) - restriction: >= net45
FSharp.Core (>= 4.3.4) - restriction: && (< net45) (>= netstandard2.0)
Giraffe (4.1) - restriction: >= netcoreapp3.1
Giraffe (4.1) - restriction: >= netstandard2.0
FSharp.Core (>= 4.7) - restriction: || (>= net461) (>= netstandard2.0)
Microsoft.IO.RecyclableMemoryStream (>= 1.2.2) - restriction: || (>= net461) (>= netstandard2.0)
Newtonsoft.Json (>= 12.0.2) - restriction: || (>= net461) (>= netstandard2.0)
@@ -2424,7 +2510,7 @@ NUGET
System.Threading.Timer (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1))
System.Xml.ReaderWriter (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (>= net46) (< netstandard1.4)) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81) (< wp8)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1))
System.Xml.XDocument (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81) (< wp8)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1))
Newtonsoft.Json (12.0.3) - restriction: >= netcoreapp3.1
Newtonsoft.Json (12.0.3) - restriction: >= netstandard2.0
runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0))
runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0))
runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0))
@@ -2688,7 +2774,7 @@ NUGET
System.Reflection.Primitives (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wp8) (< wpa81) (< xamarintvos) (< xamarinwatchos)
System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wp8) (< wpa81) (< xamarintvos) (< xamarinwatchos)
System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wp8) (< wpa81) (< xamarintvos) (< xamarinwatchos)
System.Reflection.Emit.Lightweight (4.7) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (>= netcoreapp3.1) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81))
System.Reflection.Emit.Lightweight (4.7) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (>= netcoreapp3.1) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81))
System.Reflection (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wp8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wp8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac)) (>= netcoreapp5.0) (&& (< netstandard2.0) (>= wpa81)) (&& (>= portable-net45+win8+wp8+wpa81) (< portable-net45+wp8) (< win8)) (&& (< portable-net45+wp8) (>= win8)) (>= uap10.1)
System.Reflection.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wp8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp5.0)
@@ -2910,6 +2996,10 @@ NUGET
FSharp.Core (>= 4.1.17) - restriction: || (&& (>= net45) (< net46) (< netstandard1.6)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.6)) (>= net47)
NETStandard.Library (>= 1.6.1) - restriction: && (< net45) (>= netstandard1.6) (< netstandard2.0)
System.ValueTuple (>= 4.4) - restriction: || (&& (>= net45) (< net46) (< netstandard1.6)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0)) (&& (>= net46) (< netstandard1.6)) (>= net47)
TypeShape (8.0.1) - restriction: >= netstandard2.0
FSharp.Core (>= 3.1.2) - restriction: >= net45
FSharp.Core (>= 4.3.4) - restriction: && (< net45) (>= netstandard2.0)
System.Reflection.Emit.Lightweight (>= 4.3) - restriction: && (< net45) (>= netstandard2.0)
Utf8Json (1.3.7) - restriction: >= netcoreapp3.1
System.Reflection.Emit (>= 4.3) - restriction: || (&& (>= net45) (< netstandard2.0)) (&& (< net45) (>= netstandard2.0)) (>= net47)
System.Reflection.Emit.Lightweight (>= 4.3) - restriction: || (&& (>= net45) (< netstandard2.0)) (&& (< net45) (>= netstandard2.0)) (>= net47)

View File

@@ -26,6 +26,9 @@ var CONFIG = {
// When using webpack-dev-server, you may need to redirect some calls
// to a external API server. See https://webpack.js.org/configuration/dev-server/#devserver-proxy
devServerProxy: {
'/Api': {
target: 'http://localhost:' + (process.env.GIRAFFE_FABLE_PORT || '8085')
},
'/SignalR': {
target: 'http://localhost:' + (process.env.GIRAFFE_FABLE_PORT || '8085'),
changeOrigin: true,