{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module SAML2.Bindings.Identifiers where
import SAML2.XML
import SAML2.Core.Namespaces
import SAML2.Core.Versioning
data Binding
= BindingSOAP
| BindingPAOS
| BindingHTTPRedirect
| BindingHTTPPOST
| BindingHTTPArtifact
| BindingURI
deriving (Binding -> Binding -> Bool
(Binding -> Binding -> Bool)
-> (Binding -> Binding -> Bool) -> Eq Binding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Binding -> Binding -> Bool
== :: Binding -> Binding -> Bool
$c/= :: Binding -> Binding -> Bool
/= :: Binding -> Binding -> Bool
Eq, Binding
Binding -> Binding -> Bounded Binding
forall a. a -> a -> Bounded a
$cminBound :: Binding
minBound :: Binding
$cmaxBound :: Binding
maxBound :: Binding
Bounded, Int -> Binding
Binding -> Int
Binding -> [Binding]
Binding -> Binding
Binding -> Binding -> [Binding]
Binding -> Binding -> Binding -> [Binding]
(Binding -> Binding)
-> (Binding -> Binding)
-> (Int -> Binding)
-> (Binding -> Int)
-> (Binding -> [Binding])
-> (Binding -> Binding -> [Binding])
-> (Binding -> Binding -> [Binding])
-> (Binding -> Binding -> Binding -> [Binding])
-> Enum Binding
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: Binding -> Binding
succ :: Binding -> Binding
$cpred :: Binding -> Binding
pred :: Binding -> Binding
$ctoEnum :: Int -> Binding
toEnum :: Int -> Binding
$cfromEnum :: Binding -> Int
fromEnum :: Binding -> Int
$cenumFrom :: Binding -> [Binding]
enumFrom :: Binding -> [Binding]
$cenumFromThen :: Binding -> Binding -> [Binding]
enumFromThen :: Binding -> Binding -> [Binding]
$cenumFromTo :: Binding -> Binding -> [Binding]
enumFromTo :: Binding -> Binding -> [Binding]
$cenumFromThenTo :: Binding -> Binding -> Binding -> [Binding]
enumFromThenTo :: Binding -> Binding -> Binding -> [Binding]
Enum, Int -> Binding -> ShowS
[Binding] -> ShowS
Binding -> String
(Int -> Binding -> ShowS)
-> (Binding -> String) -> ([Binding] -> ShowS) -> Show Binding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Binding -> ShowS
showsPrec :: Int -> Binding -> ShowS
$cshow :: Binding -> String
show :: Binding -> String
$cshowList :: [Binding] -> ShowS
showList :: [Binding] -> ShowS
Show)
instance Identifiable URI Binding where
identifier :: Binding -> URI
identifier = String -> (SAMLVersion, String) -> URI
samlURNIdentifier String
"bindings" ((SAMLVersion, String) -> URI)
-> (Binding -> (SAMLVersion, String)) -> Binding -> URI
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Binding -> (SAMLVersion, String)
f where
f :: Binding -> (SAMLVersion, String)
f Binding
BindingSOAP = (SAMLVersion
SAML20, String
"SOAP")
f Binding
BindingPAOS = (SAMLVersion
SAML20, String
"PAOS")
f Binding
BindingHTTPRedirect = (SAMLVersion
SAML20, String
"HTTP-Redirect")
f Binding
BindingHTTPPOST = (SAMLVersion
SAML20, String
"HTTP-POST")
f Binding
BindingHTTPArtifact = (SAMLVersion
SAML20, String
"HTTP-Artifact")
f Binding
BindingURI = (SAMLVersion
SAML20, String
"URI")