I hereby claim:
- I am basti1302 on github.
- I am basti1302 (https://keybase.io/basti1302) on keybase.
- I have a public key ASBijUw927CXoPXFpcWt9FmaJAA-gHurdMeZf9l23Bj2eAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I'm working on an JSON/HTTP backend that uses cookie/access token based authentication, modelled after https://haskell-servant.readthedocs.io/en/stable/tutorial/Authentication.html#generalized-authentication
Now I would like to add role based authorization to the mix. The User datatype that I use in my AuthHandler has a role attribute.
As far as I understand it, the user object is added to the context when the
| {-# LANGUAGE ScopedTypeVariables #-} | |
| module Util.Migration (upgradeDatabase) where | |
| import qualified Util.Config as Config | |
| import Control.Monad (forM_) | |
| import Database.Schema.Migrations | |
| import Database.Schema.Migrations.Backend | |
| import Database.Schema.Migrations.Filesystem (FilesystemStoreSettings (..), |
| Test suite dbmigrations-tests: RUNNING... | |
| ### Failure in: 1:MySQL backend tests | |
| test/BackendTest.hs:120 | |
| Installed migrations | |
| expected: ["root"] | |
| but got: ["root","second"] | |
| Cases: 80 Tried: 80 Errors: 0 Failures: 1 | |
| Migration created successfully: "first" | |
| Migration created successfully: "first" | |
| Migration created successfully: "second" |
| import Html | |
| type alias Model = { a : String } | |
| one = { a = "1" } | |
| two = { a = "2" } | |
| getNext : Model -> Model | |
| getNext current = | |
| let |
| import Html exposing (..) | |
| import Random | |
| import Random exposing (Seed) | |
| import Signal exposing (Signal, (<~), (~)) | |
| import Time exposing (every, second) | |
| randomFloat : Seed -> Float | |
| randomFloat seed = seed |> (Random.generate <| Random.float 0 1) |> fst | |
| randomBool : Seed -> Bool |
| 'use strict'; | |
| var request = require('request') | |
| var traverson = require('./traverson') | |
| var rootUri = 'https://api.github.com/' | |
| // optional: raises the rate limit of the GitHub API from 60 requests to 5000 requests per hour | |
| var ghUser = 'basti1302', | |
| ghPass = '...' |
| Feature: Optional parameter | |
| Scenario: Use an optional parameter | |
| When I execute a step | |
| When I execute a step with the optional parameter whatever |
These instructions are intended for following a tutorial about Cucumber. The tutorial can be found here:
You should have some version of git installed. Personally, I prefer Git Bash from http://msysgit.github.io/.