| Copyright | © Herbert Valerio Riedel 2019 |
|---|---|
| License | GPL-2.0-or-later |
| Safe Haskell | Trustworthy |
| 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
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 Methods asParsec :: Stream s Identity Char => Parsec s () DistinguishedName Source # asBuilder :: DistinguishedName -> Builder Source # renderShortText :: DistinguishedName -> ShortText Source # | |
rfc4514coreAttributes :: [(KeyString, OID)] Source #
Haskell representation of the table below as defined in RFC4514 Section 3.
| String | X.500 AttributeType |
|---|---|
| CN | commonName (2.5.4.3) |
| L | localityName (2.5.4.7) |
| ST | stateOrProvinceName (2.5.4.8) |
| O | organizationName (2.5.4.10) |
| OU | organizationalUnitName (2.5.4.11) |
| C | countryName (2.5.4.6) |
| STREET | streetAddress (2.5.4.9) |
| DC | domainComponent (0.9.2342.19200300.100.1.25) |
| UID | userId (0.9.2342.19200300.100.1.1) |
Since: 0.1.1