From d6f1821170881e6abfbe7005dcea74e8c4be16c5 Mon Sep 17 00:00:00 2001 From: Arash Rouhani Date: Fri, 9 Mar 2012 21:20:39 +0100 Subject: [PATCH] Remove kerberos support for yesod-auth New repo at Tarrasch/yesod-auth-kerberos --- yesod-auth-kerberos/LICENSE | 25 ---- yesod-auth-kerberos/Setup.lhs | 8 -- yesod-auth-kerberos/Yesod/Auth/Kerberos.hs | 123 ------------------ yesod-auth-kerberos/include/qq.h | 10 -- yesod-auth-kerberos/yesod-auth-kerberos.cabal | 39 ------ yesod-auth/kerberos.hs | 41 ------ 6 files changed, 246 deletions(-) delete mode 100644 yesod-auth-kerberos/LICENSE delete mode 100755 yesod-auth-kerberos/Setup.lhs delete mode 100644 yesod-auth-kerberos/Yesod/Auth/Kerberos.hs delete mode 100644 yesod-auth-kerberos/include/qq.h delete mode 100644 yesod-auth-kerberos/yesod-auth-kerberos.cabal delete mode 100644 yesod-auth/kerberos.hs diff --git a/yesod-auth-kerberos/LICENSE b/yesod-auth-kerberos/LICENSE deleted file mode 100644 index 8643e5d8..00000000 --- a/yesod-auth-kerberos/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -The following license covers this documentation, and the source code, except -where otherwise indicated. - -Copyright 2010, Michael Snoyman. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/yesod-auth-kerberos/Setup.lhs b/yesod-auth-kerberos/Setup.lhs deleted file mode 100755 index 1bc517f6..00000000 --- a/yesod-auth-kerberos/Setup.lhs +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env runhaskell - -> module Main where -> import Distribution.Simple -> import System.Cmd (system) - -> main :: IO () -> main = defaultMain diff --git a/yesod-auth-kerberos/Yesod/Auth/Kerberos.hs b/yesod-auth-kerberos/Yesod/Auth/Kerberos.hs deleted file mode 100644 index f28d5406..00000000 --- a/yesod-auth-kerberos/Yesod/Auth/Kerberos.hs +++ /dev/null @@ -1,123 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE CPP #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE OverloadedStrings #-} --- | In-built kerberos authentication for Yesod. --- --- Please note that all configuration should have been done --- manually on the machine prior to running the code. --- --- On linux machines the configuration might be in /etc/krb5.conf. --- It's worth checking if the Kerberos service provider (e.g. your university) --- already provide a complete configuration file. --- --- Be certain that you can manually login from a shell by typing --- --- > kinit username --- --- If you fill in your password and the program returns no error code, --- then your kerberos configuration is setup properly. --- Only then can this module be of any use. -module Yesod.Auth.Kerberos - ( authKerberos, - genericAuthKerberos, - KerberosConfig(..), - defaultKerberosConfig - ) where - -#include "qq.h" - -import Yesod.Auth -import Yesod.Auth.Message -import Web.Authenticate.Kerberos -import Data.Text (Text) -import qualified Data.Text as T -import Text.Hamlet -import Yesod.Handler -import Yesod.Widget -import Control.Monad.IO.Class (liftIO) -import Yesod.Form -import Control.Applicative ((<$>), (<*>)) - -data KerberosConfig = KerberosConfig { - -- | When a user gives username x, f(x) will be passed to Kerberos - usernameModifier :: Text -> Text - -- | When a user gives username x, f(x) will be passed to Yesod - , identifierModifier :: Text -> Text - } - --- | A configuration where the username the user provides is the one passed --- to both kerberos and yesod -defaultKerberosConfig :: KerberosConfig -defaultKerberosConfig = KerberosConfig id id - --- | A configurable version of 'authKerberos' -genericAuthKerberos :: YesodAuth m => KerberosConfig -> AuthPlugin m -genericAuthKerberos config = AuthPlugin "kerberos" dispatch $ \tm -> addHamlet - [QQ(hamlet)| -