| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
LDAPv3.StringRepr
Contents
Description
String representation of
- LDAPv3 search
Filters as defined by RFC4515 - LDAPv3
DistinguishedNames as defined by RFC4514
Since: 0.1.0
Synopsis
- class StringRepr a where
- renderText :: StringRepr a => a -> Text
- renderString :: StringRepr a => a -> String
- parseShortText :: StringRepr a => ShortText -> Maybe a
- parseText :: StringRepr a => Text -> Maybe a
- parseString :: StringRepr a => String -> Maybe a
- newtype DistinguishedName = DistinguishedName [NonEmpty (Either KeyString OID, Either OCTET_STRING ShortText)]
- rfc4514coreAttributes :: [(KeyString, OID)]
Documentation
class StringRepr a where Source #
Convert to and from string representations as defined by RFC4515.
Since: 0.1.0
Minimal complete definition
Methods
asParsec :: Stream s Identity Char => Parsec s () a Source #
asBuilder :: a -> Builder Source #
renderShortText :: a -> ShortText Source #
Instances
| StringRepr MatchingRuleId Source # | |
Defined in LDAPv3.AttributeDescription | |
| StringRepr KeyString Source # | |
| StringRepr OID Source # | |
| StringRepr Option Source # | |
| StringRepr AttributeDescription Source # | |
Defined in LDAPv3.AttributeDescription Methods asParsec :: Stream s Identity Char => Parsec s () AttributeDescription Source # asBuilder :: AttributeDescription -> Builder Source # renderShortText :: AttributeDescription -> ShortText Source # | |
| StringRepr Filter Source # | |
| StringRepr DistinguishedName Source # | |
Defined in LDAPv3.DistinguishedName | |
renderText :: StringRepr a => a -> Text Source #
Convenience StringRepr operation for rendering as Text
Since: 0.1.0
renderString :: StringRepr a => a -> String Source #
Convenience StringRepr operation for rendering as plain-old String
Since: 0.1.0
parseShortText :: StringRepr a => ShortText -> Maybe a Source #
Convenience StringRepr operation for parsing from ShortText
Since: 0.1.0
parseText :: StringRepr a => Text -> Maybe a Source #
Convenience StringRepr operation for parsing from Text
Since: 0.1.0
parseString :: StringRepr a => String -> Maybe a Source #
Convenience StringRepr operation for parsing from plain-old String
Since: 0.1.0
Distinguished Names
newtype DistinguishedName Source #
Decoded non-normalizing string representation of DistinguishedName
DistinguishedName ::= RDNSequence
RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
RelativeDistinguishedName ::= SET SIZE (1..MAX) OF
AttributeTypeAndValue
AttributeTypeAndValue ::= SEQUENCE {
type AttributeType,
value AttributeValue }Raw ASN.1 Hex-encoded AttributeValues are represented as OCTET_STRING (which implies they MUST not be a size-0 OCTET_STRING) whereas ShortText is used for textually encoded (possibly containing escaped characters) values.
As defined in RFC4514, the RDNSequence is serialized in reverse order.
Since: 0.1.1
Constructors
| DistinguishedName [NonEmpty (Either KeyString OID, Either OCTET_STRING ShortText)] |
Instances
| Eq DistinguishedName Source # | |
Defined in LDAPv3.DistinguishedName Methods (==) :: DistinguishedName -> DistinguishedName -> Bool # (/=) :: DistinguishedName -> DistinguishedName -> Bool # | |
| Show DistinguishedName Source # | |
Defined in LDAPv3.DistinguishedName Methods showsPrec :: Int -> DistinguishedName -> ShowS # show :: DistinguishedName -> String # showList :: [DistinguishedName] -> ShowS # | |
| StringRepr DistinguishedName Source # | |
Defined in LDAPv3.DistinguishedName | |
rfc4514coreAttributes :: [(KeyString, OID)] Source #
Haskell representation of the table below as defined in RFC4514 Section 3.
| String | X.500 AttributeType |
|---|---|
| CN L ST O OU C STREET DC UID | commonName (2.5.4.3) localityName (2.5.4.7) stateOrProvinceName (2.5.4.8) organizationName (2.5.4.10) organizationalUnitName (2.5.4.11) countryName (2.5.4.6) streetAddress (2.5.4.9) domainComponent (0.9.2342.19200300.100.1.25) userId (0.9.2342.19200300.100.1.1) |
Since: 0.1.1