@ -25,8 +25,8 @@ module Network.XMPP.Types
, Presence ( .. )
, Presence ( .. )
, PresenceError ( .. )
, PresenceError ( .. )
, PresenceType ( .. )
, PresenceType ( .. )
, SASL Error ( .. )
, Sasl Error ( .. )
, SASL Failure ( .. )
, Sasl Failure ( .. )
, ServerAddress ( .. )
, ServerAddress ( .. )
, ServerFeatures ( .. )
, ServerFeatures ( .. )
, ShowType ( .. )
, ShowType ( .. )
@ -468,67 +468,67 @@ instance Read StanzaErrorCondition where
-- OTHER STUFF
-- OTHER STUFF
-- =============================================================================
-- =============================================================================
data SASLFailure = SASL Failure { saslFailureCondition :: SASL Error
data SaslFailure = Sasl Failure { saslFailureCondition :: Sasl Error
, saslFailureText :: Maybe ( Maybe LangTag
, saslFailureText :: Maybe ( Maybe LangTag
, Text
, Text
)
)
} deriving Show
} deriving Show
data SASLError = SASL Aborted -- ^ Client aborted
data SaslError = Sasl Aborted -- ^ Client aborted
| SASL AccountDisabled -- ^ The account has been temporarily
| Sasl AccountDisabled -- ^ The account has been temporarily
-- disabled
-- disabled
| SASL CredentialsExpired -- ^ The authentication failed because
| Sasl CredentialsExpired -- ^ The authentication failed because
-- the credentials have expired
-- the credentials have expired
| SASL EncryptionRequired -- ^ The mechanism requested cannot be
| Sasl EncryptionRequired -- ^ The mechanism requested cannot be
-- used the confidentiality and
-- used the confidentiality and
-- integrity of the underlying
-- integrity of the underlying
-- stream is protected (typically
-- stream is protected (typically
-- with TLS)
-- with TLS)
| SASL IncorrectEncoding -- ^ The base64 encoding is incorrect
| Sasl IncorrectEncoding -- ^ The base64 encoding is incorrect
| SASL InvalidAuthzid -- ^ The authzid has an incorrect
| Sasl InvalidAuthzid -- ^ The authzid has an incorrect
-- format or the initiating entity does
-- format or the initiating entity does
-- not have the appropriate permissions
-- not have the appropriate permissions
-- to authorize that ID
-- to authorize that ID
| SASL InvalidMechanism -- ^ The mechanism is not supported by
| Sasl InvalidMechanism -- ^ The mechanism is not supported by
-- the receiving entity
-- the receiving entity
| SASL MalformedRequest -- ^ Invalid syntax
| Sasl MalformedRequest -- ^ Invalid syntax
| SASL MechanismTooWeak -- ^ The receiving entity policy
| Sasl MechanismTooWeak -- ^ The receiving entity policy
-- requires a stronger mechanism
-- requires a stronger mechanism
| SASL NotAuthorized -- ^ Invalid credentials
| Sasl NotAuthorized -- ^ Invalid credentials
-- provided, or some
-- provided, or some
-- generic authentication
-- generic authentication
-- failure has occurred
-- failure has occurred
| SASL TemporaryAuthFailure -- ^ There receiving entity reported a
| Sasl TemporaryAuthFailure -- ^ There receiving entity reported a
-- temporary error condition; the
-- temporary error condition; the
-- initiating entity is recommended
-- initiating entity is recommended
-- to try again later
-- to try again later
instance Show SASL Error where
instance Show Sasl Error where
show SASL Aborted = " aborted "
show Sasl Aborted = " aborted "
show SASL AccountDisabled = " account-disabled "
show Sasl AccountDisabled = " account-disabled "
show SASL CredentialsExpired = " credentials-expired "
show Sasl CredentialsExpired = " credentials-expired "
show SASL EncryptionRequired = " encryption-required "
show Sasl EncryptionRequired = " encryption-required "
show SASL IncorrectEncoding = " incorrect-encoding "
show Sasl IncorrectEncoding = " incorrect-encoding "
show SASL InvalidAuthzid = " invalid-authzid "
show Sasl InvalidAuthzid = " invalid-authzid "
show SASL InvalidMechanism = " invalid-mechanism "
show Sasl InvalidMechanism = " invalid-mechanism "
show SASL MalformedRequest = " malformed-request "
show Sasl MalformedRequest = " malformed-request "
show SASL MechanismTooWeak = " mechanism-too-weak "
show Sasl MechanismTooWeak = " mechanism-too-weak "
show SASL NotAuthorized = " not-authorized "
show Sasl NotAuthorized = " not-authorized "
show SASL TemporaryAuthFailure = " temporary-auth-failure "
show Sasl TemporaryAuthFailure = " temporary-auth-failure "
instance Read SASL Error where
instance Read Sasl Error where
readsPrec _ " aborted " = [ ( SASL Aborted , " " ) ]
readsPrec _ " aborted " = [ ( Sasl Aborted , " " ) ]
readsPrec _ " account-disabled " = [ ( SASL AccountDisabled , " " ) ]
readsPrec _ " account-disabled " = [ ( Sasl AccountDisabled , " " ) ]
readsPrec _ " credentials-expired " = [ ( SASL CredentialsExpired , " " ) ]
readsPrec _ " credentials-expired " = [ ( Sasl CredentialsExpired , " " ) ]
readsPrec _ " encryption-required " = [ ( SASL EncryptionRequired , " " ) ]
readsPrec _ " encryption-required " = [ ( Sasl EncryptionRequired , " " ) ]
readsPrec _ " incorrect-encoding " = [ ( SASL IncorrectEncoding , " " ) ]
readsPrec _ " incorrect-encoding " = [ ( Sasl IncorrectEncoding , " " ) ]
readsPrec _ " invalid-authzid " = [ ( SASL InvalidAuthzid , " " ) ]
readsPrec _ " invalid-authzid " = [ ( Sasl InvalidAuthzid , " " ) ]
readsPrec _ " invalid-mechanism " = [ ( SASL InvalidMechanism , " " ) ]
readsPrec _ " invalid-mechanism " = [ ( Sasl InvalidMechanism , " " ) ]
readsPrec _ " malformed-request " = [ ( SASL MalformedRequest , " " ) ]
readsPrec _ " malformed-request " = [ ( Sasl MalformedRequest , " " ) ]
readsPrec _ " mechanism-too-weak " = [ ( SASL MechanismTooWeak , " " ) ]
readsPrec _ " mechanism-too-weak " = [ ( Sasl MechanismTooWeak , " " ) ]
readsPrec _ " not-authorized " = [ ( SASL NotAuthorized , " " ) ]
readsPrec _ " not-authorized " = [ ( Sasl NotAuthorized , " " ) ]
readsPrec _ " temporary-auth-failure " = [ ( SASL TemporaryAuthFailure , " " ) ]
readsPrec _ " temporary-auth-failure " = [ ( Sasl TemporaryAuthFailure , " " ) ]
readsPrec _ _ = []
readsPrec _ _ = []
-- | Readability type for host name Texts.
-- | Readability type for host name Texts.