Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data UserIdentity
- isSSOIdentity :: UserIdentity -> Bool
- newIdentity :: Maybe EmailAddress -> Maybe UserSSOId -> Maybe UserIdentity
- emailIdentity :: UserIdentity -> Maybe EmailAddress
- ssoIdentity :: UserIdentity -> Maybe UserSSOId
- userIdentityObjectSchema :: ObjectSchema SwaggerDoc UserIdentity
- maybeUserIdentityObjectSchema :: ObjectSchema SwaggerDoc (Maybe UserIdentity)
- maybeUserIdentityFromComponents :: UserIdentityComponents -> Maybe UserIdentity
- newtype Phone = Phone {}
- parsePhone :: Text -> Maybe Phone
- isValidPhone :: Text -> Bool
- module Wire.API.User.EmailAddress
- data UserSSOId
- mkSampleUref :: Text -> Text -> UserRef
- mkSimpleSampleUref :: UserRef
UserIdentity
data UserIdentity Source #
The private unique user identity that is used for login and account recovery.
Instances
isSSOIdentity :: UserIdentity -> Bool Source #
newIdentity :: Maybe EmailAddress -> Maybe UserSSOId -> Maybe UserIdentity Source #
ssoIdentity :: UserIdentity -> Maybe UserSSOId Source #
maybeUserIdentityFromComponents :: UserIdentityComponents -> Maybe UserIdentity Source #
Phone
Instances
Arbitrary Phone Source # | |
FromJSON Phone Source # | |
ToJSON Phone Source # | |
Generic Phone Source # | |
Show Phone Source # | |
FromByteString Phone Source # | |
Defined in Wire.API.User.Phone | |
ToByteString Phone Source # | |
Cql Phone Source # | |
Eq Phone Source # | |
Ord Phone Source # | |
FromHttpApiData Phone Source # | |
Defined in Wire.API.User.Phone | |
ToHttpApiData Phone Source # | |
Defined in Wire.API.User.Phone toUrlPiece :: Phone -> Text Source # toEncodedUrlPiece :: Phone -> Builder Source # toHeader :: Phone -> ByteString Source # toQueryParam :: Phone -> Text Source # toEncodedQueryParam :: Phone -> Builder Source # | |
ToParamSchema Phone Source # | |
Defined in Wire.API.User.Phone | |
ToSchema Phone Source # | |
Defined in Wire.API.User.Phone | |
ToSchema Phone Source # | |
Defined in Wire.API.User.Phone | |
type Rep Phone Source # | |
Defined in Wire.API.User.Phone |
parsePhone :: Text -> Maybe Phone Source #
Parses a phone number in E.164 format with a mandatory leading +
.
isValidPhone :: Text -> Bool Source #
Checks whether a phone number is valid, i.e. it is in E.164 format
with a mandatory leading +
followed by 10-15 digits.
module Wire.API.User.EmailAddress
UserSSOId
User's external identity.
NB: this type is serialized to the full xml encoding of the UserRef
components, but
deserialiation is more lenient: it also allows for the Issuer
to be a plain URL (without
xml around it), and the NameID
to be an email address (=> format "email") or an arbitrary
text (=> format "unspecified"). This is for backwards compatibility and general
robustness.
FUTUREWORK: we should probably drop this entirely and store saml and scim data in separate database columns.
Instances
mkSampleUref :: Text -> Text -> UserRef Source #
For testing. Create a sample UserRef
value with random seeds to make Issuer
and
NameID
unique. FUTUREWORK: move to saml2-web-sso.
mkSimpleSampleUref :: UserRef Source #
mkSampleUref "" ""