From a53f7aaac45a3dea54da40b07f6857035a5eace1 Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Sun, 28 Jun 2015 00:40:29 +0200 Subject: [PATCH] added EVE-SSO. --- Foundation.hs | 2 ++ README.md | 4 +++- install.sh | 9 +++++++++ neat.cabal | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 install.sh diff --git a/Foundation.hs b/Foundation.hs index 7a844db..4c5edaa 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -9,6 +9,7 @@ import Yesod.Default.Util (addStaticContentExternal) import Yesod.Core.Types (Logger) import qualified Yesod.Core.Unsafe as Unsafe import Yesod.Auth.HashDB (authHashDB) +import Yesod.Auth.OAuth2.EveOnline (oauth2EveImage,ImageType(..)) -- | The foundation datatype for your application. This can be a good place to -- keep settings and values requiring initialization before your application @@ -153,6 +154,7 @@ instance YesodAuth App where -- You can add other plugins like BrowserID, email or OAuth here authPlugins _ = [ authBrowserId def , authHashDB (Just . UniqueUser) + , oauth2EveImage "" "" BigBlack ] authHttpManager = getHttpManager diff --git a/README.md b/README.md index c86cd5f..5774fab 100644 --- a/README.md +++ b/README.md @@ -32,4 +32,6 @@ At the moment there is nothing much to see here but a bit of playing around with GRANT ALL ON DATABASE neat TO neat; ``` -6. run yesod with ```yesod devel``` +6. install dependencies and setup sandbox (invoke install.sh) + +7. run yesod with ```yesod devel``` diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..78a381b --- /dev/null +++ b/install.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +mkdir deps +cd deps +git clone https://github.com/Drezil/yesod-auth-oauth2 +cd .. +cabal sandbox init +cabal sandbox add-source deps/yesod-auth-oauth2 +cabal install --only-dependencies diff --git a/neat.cabal b/neat.cabal index 447c552..6a0ed8d 100644 --- a/neat.cabal +++ b/neat.cabal @@ -55,6 +55,7 @@ library , yesod-static >= 1.4.0.3 && < 1.5 , yesod-form >= 1.4.0 && < 1.5 , yesod-auth-hashdb >= 1.4.0 && < 1.5 + , yesod-auth-oauth2 >= 0.1.2 , classy-prelude >= 0.10.2 , classy-prelude-conduit >= 0.10.2 , classy-prelude-yesod >= 0.10.2