Safe Haskell | None |
---|---|
Language | Haskell2010 |
OpenTok.Token
Synopsis
- data Role
- data TokenOptions = TokenOptions {}
- tokenOpts :: TokenOptions
- sanitize :: String -> String
- validSessionId :: SessionId -> APIKey -> Bool
- validExpireTime :: TokenOptions -> IO Bool
- cleanTokenOptions :: [(a, Maybe b)] -> [(a, Maybe b)]
- formatToken :: String -> String
- encodeToken :: APIKey -> APISecret -> SessionId -> TokenOptions -> IO Token
- generate :: APIKey -> APISecret -> SessionId -> TokenOptions -> IO (Either OTError Token)
Documentation
Information on user roles can be found at https://tokbox.com/developer/guides/create-token/
Constructors
Subscriber | |
Publisher | |
Moderator |
data TokenOptions Source #
Constructors
TokenOptions | |
Fields
|
Instances
Show TokenOptions Source # | |
Defined in OpenTok.Token Methods showsPrec :: Int -> TokenOptions -> ShowS # show :: TokenOptions -> String # showList :: [TokenOptions] -> ShowS # | |
Generic TokenOptions Source # | |
Defined in OpenTok.Token Associated Types type Rep TokenOptions :: * -> * # | |
type Rep TokenOptions Source # | |
Defined in OpenTok.Token type Rep TokenOptions = D1 (MetaData "TokenOptions" "OpenTok.Token" "opentok-0.0.1-C3l0wmoQLhV5aSIPMnVfOR" False) (C1 (MetaCons "TokenOptions" PrefixI True) ((S1 (MetaSel (Just "_role") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Role) :*: S1 (MetaSel (Just "_expireTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe UTCTime))) :*: (S1 (MetaSel (Just "_connectionData") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: S1 (MetaSel (Just "_initialLayoutClassList") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [String]))))) |
tokenOpts :: TokenOptions Source #
Default token options
validSessionId :: SessionId -> APIKey -> Bool Source #
Extract an API key from a session Id and compare against provided key
validExpireTime :: TokenOptions -> IO Bool Source #
Validate token options
cleanTokenOptions :: [(a, Maybe b)] -> [(a, Maybe b)] Source #
Remove pairs with Nothing values before creating query string
formatToken :: String -> String Source #
Remove new-line characters from the final token
encodeToken :: APIKey -> APISecret -> SessionId -> TokenOptions -> IO Token Source #
Create a SHA1 encoded token