atlassian-connect-core 0.9.0.1 → 0.10.0.0
raw patch · 4 files changed
+5/−28 lines, 4 files
Files
- atlassian-connect-core.cabal +1/−1
- src/Snap/AtlassianConnect.hs +0/−2
- src/Snap/AtlassianConnect/PageToken.hs +1/−1
- src/Snap/AtlassianConnect/Tenant.hs +3/−24
atlassian-connect-core.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: atlassian-connect-core-version: 0.9.0.1+version: 0.10.0.0 synopsis: Atlassian Connect snaplet for the Snap Framework and helper code. description: This library allows you to quickly get an Atlassian Connect application running on top of the Snap Framework. It provides best practices and helper functions to get you moving
src/Snap/AtlassianConnect.hs view
@@ -48,8 +48,6 @@ , LifecycleResponse(..) , ClientKey , Tenant(..)- , SafeTenant(..)- , toSafeTenant , TenantKey , TenantWithUser -- * QSH
src/Snap/AtlassianConnect/PageToken.hs view
@@ -64,7 +64,7 @@ -- | Given a tentant, a potential user and a time generate a page token. generateToken :: CT.TenantWithUser -> UTCTime -> PageToken generateToken (tenant, userKey) timestamp = PageToken- { pageTokenHost = CT.sKey tenant+ { pageTokenHost = CT.key tenant , pageTokenUser = userKey , pageTokenTimestamp = timestamp , pageTokenAllowInsecurePolling = False
src/Snap/AtlassianConnect/Tenant.hs view
@@ -2,8 +2,6 @@ module Snap.AtlassianConnect.Tenant ( TenantWithUser , Tenant(..)- , SafeTenant(..)- , toSafeTenant , TenantKey ) where @@ -15,8 +13,10 @@ -- | When we get a tenant from Atlassian Connect we can also optionally reciever the user key that made the request. -- This structure reflects that possibility.-type TenantWithUser = (SafeTenant, Maybe CA.UserKey)+type TenantWithUser = (Tenant, Maybe CA.UserKey) +instance FromJSON Tenant+ -- | Represents a tenant key. The unique identifier for each Atlassian Connect tenant. type TenantKey = T.Text @@ -31,24 +31,3 @@ , baseUrl :: ConnectURI -- ^ The base url of the Atlassian Cloud host application (product). , productType :: T.Text -- ^ The type of product you have connected to in the Atlassian Cloud. (E.g. JIRA, Confluence) } deriving (Eq, Show, Generic)---- | Represents an Atlassian Cloud tenant. Your Atlassian Connect add-on can be installed into multiple Atlassian--- Cloud tenants.-data SafeTenant = SafeTenant- { sTenantId :: Integer -- ^ Your identifier for this tenant.- , sKey :: TenantKey -- ^ The unique identifier for this tenant accross Atlassian Connect.- , sPublicKey :: T.Text -- ^ The public key for this atlassian connect application.- , sOauthClientId :: Maybe T.Text -- ^ The OAuth Client Id for this tenant. If this add-on does not support user impersonation then this may not be present.- , sBaseUrl :: ConnectURI -- ^ The base url of the Atlassian Cloud host application (product).- , sProductType :: T.Text -- ^ The type of product you have connected to in the Atlassian Cloud. (E.g. JIRA, Confluence)- } deriving (Eq, Show, Generic)--toSafeTenant :: Tenant -> SafeTenant-toSafeTenant t = SafeTenant- { sTenantId = tenantId t- , sKey = key t- , sPublicKey = publicKey t- , sOauthClientId = oauthClientId t- , sBaseUrl = baseUrl t- , sProductType = productType t- }