wire-api-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.API.User.Identity

Synopsis

UserIdentity

data UserIdentity Source #

The private unique user identity that is used for login and account recovery.

Instances

Instances details
Arbitrary UserIdentity Source # 
Instance details

Defined in Wire.API.User.Identity

Generic UserIdentity Source # 
Instance details

Defined in Wire.API.User.Identity

Associated Types

type Rep UserIdentity :: Type -> Type #

Show UserIdentity Source # 
Instance details

Defined in Wire.API.User.Identity

Eq UserIdentity Source # 
Instance details

Defined in Wire.API.User.Identity

Ord UserIdentity Source # 
Instance details

Defined in Wire.API.User.Identity

type Rep UserIdentity Source # 
Instance details

Defined in Wire.API.User.Identity

Phone

newtype Phone Source #

Constructors

Phone 

Fields

Instances

Instances details
Arbitrary Phone Source # 
Instance details

Defined in Wire.API.User.Phone

FromJSON Phone Source # 
Instance details

Defined in Wire.API.User.Phone

ToJSON Phone Source # 
Instance details

Defined in Wire.API.User.Phone

Generic Phone Source # 
Instance details

Defined in Wire.API.User.Phone

Associated Types

type Rep Phone :: Type -> Type #

Methods

from :: Phone -> Rep Phone x #

to :: Rep Phone x -> Phone #

Show Phone Source # 
Instance details

Defined in Wire.API.User.Phone

Methods

showsPrec :: Int -> Phone -> ShowS #

show :: Phone -> String #

showList :: [Phone] -> ShowS #

FromByteString Phone Source # 
Instance details

Defined in Wire.API.User.Phone

Methods

parser :: Parser Phone Source #

ToByteString Phone Source # 
Instance details

Defined in Wire.API.User.Phone

Cql Phone Source # 
Instance details

Defined in Wire.API.User.Phone

Eq Phone Source # 
Instance details

Defined in Wire.API.User.Phone

Methods

(==) :: Phone -> Phone -> Bool #

(/=) :: Phone -> Phone -> Bool #

Ord Phone Source # 
Instance details

Defined in Wire.API.User.Phone

Methods

compare :: Phone -> Phone -> Ordering #

(<) :: Phone -> Phone -> Bool #

(<=) :: Phone -> Phone -> Bool #

(>) :: Phone -> Phone -> Bool #

(>=) :: Phone -> Phone -> Bool #

max :: Phone -> Phone -> Phone #

min :: Phone -> Phone -> Phone #

FromHttpApiData Phone Source # 
Instance details

Defined in Wire.API.User.Phone

ToHttpApiData Phone Source # 
Instance details

Defined in Wire.API.User.Phone

ToParamSchema Phone Source # 
Instance details

Defined in Wire.API.User.Phone

ToSchema Phone Source # 
Instance details

Defined in Wire.API.User.Phone

ToSchema Phone Source # 
Instance details

Defined in Wire.API.User.Phone

type Rep Phone Source # 
Instance details

Defined in Wire.API.User.Phone

type Rep Phone = D1 ('MetaData "Phone" "Wire.API.User.Phone" "wire-api-0.1.0-EbZS9CKNOfZ8BBy5DRJfXi" 'True) (C1 ('MetaCons "Phone" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromPhone") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

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.

Email

UserSSOId

data UserSSOId Source #

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

Instances details
Arbitrary UserSSOId Source # 
Instance details

Defined in Wire.API.User.Identity

FromJSON UserSSOId Source # 
Instance details

Defined in Wire.API.User.Identity

ToJSON UserSSOId Source # 
Instance details

Defined in Wire.API.User.Identity

Generic UserSSOId Source # 
Instance details

Defined in Wire.API.User.Identity

Associated Types

type Rep UserSSOId :: Type -> Type #

Show UserSSOId Source # 
Instance details

Defined in Wire.API.User.Identity

Cql UserSSOId Source # 
Instance details

Defined in Wire.API.User.Identity

Eq UserSSOId Source # 
Instance details

Defined in Wire.API.User.Identity

Ord UserSSOId Source # 
Instance details

Defined in Wire.API.User.Identity

ToSchema UserSSOId Source #

FUTUREWORK: This schema should ideally be a choice of either tenant+subject, or scim_external_id but this is currently not possible to derive in swagger2 Maybe this becomes possible with swagger 3?

Instance details

Defined in Wire.API.User.Identity

type Rep UserSSOId Source # 
Instance details

Defined in Wire.API.User.Identity

type Rep UserSSOId = D1 ('MetaData "UserSSOId" "Wire.API.User.Identity" "wire-api-0.1.0-EbZS9CKNOfZ8BBy5DRJfXi" 'False) (C1 ('MetaCons "UserSSOId" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UserRef)) :+: C1 ('MetaCons "UserScimExternalId" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

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 "" ""