me → Text → Text → Text
signAccessToken sec domain me now scope clientId = encodeSigned (hmacSecret sec) t
  where t = mempty { iss = stringOrURI domain
                   , sub = stringOrURI $ dropWhileEnd (== '/') me
                   , iat = numericDate $ utcTimeToPOSIXSeconds now
                   , unregisteredClaims = ClaimsMap $ M.fromList [ ("scope", String scope)
                                                                 , ("client_id", String clientId) ] }

makeAccessToken ∷ Text → Text → Text → Text → Sweetroll 
signAccessToken ∷ Text → Text → Text → UTCTime → Text → Text → Text
signAccessToken sec domain me now scope clientId = encodeSigned (hmacSecret sec) t
  where t = mempty { iss = stringOrURI domain
                   , sub = stringOrURI $ dropWhileEnd (== '/') me
                   , iat = numericDate $ utcTimeToPOSIXSeconds now
                   , unregisteredClaims = ClaimsMap $ M.fromList [ ("scope", String scope)
                                                                 , ("client_id", String clientId) ] }
signAccessToken sec domain me now scope clientId = encodeSigned (hmacSecret sec) t
  where t = mempty { iss = stringOrURI domain
                   , sub = stringOrURI $ dropWhileEnd (== '/') me
                   , iat = numericDate $ utcTimeToPOSIXSeconds now
                   , unregisteredClaims = ClaimsMap $ M.fromList [ ("scope", String scope)
                                                                 , ("client_id", String clientId) ] }