You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "René Cordier (Jira)" <se...@james.apache.org> on 2020/03/09 09:05:00 UTC

[jira] [Updated] (JAMES-2890) Session pojo and serialization

     [ https://issues.apache.org/jira/browse/JAMES-2890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

René Cordier updated JAMES-2890:
--------------------------------
    Description: 
{code:java}
{
  "capabilities": {
     "urn:ietf:params:jmap:core":
       "maxSizeUpload": 10000000,
       "maxConcurrentUpload": 4,
       "maxSizeRequest": 10000000,
       "maxConcurrentRequests": 4,
       "maxCallsInRequest": 16,
       "maxObjectsInGet": 500,
       "maxObjectsInSet": 500,
       "collationAlgorithms": ["i;unicode-casemap"]
     },
     "urn:ietf:params:jmap:mail":
       "maxMailboxesPerEmail": 10000000,
       "maxMailboxDepth": null,
       "maxSizeMailboxName": 200,
       "maxSizeAttachmentsPerEmail": 20000000,
       "mayCreateTopLevelMailbox": true,
       "emailQuerySortOptions": ["receivedAt", "cc", "from", "to", "subject", "size", "sentAt", "hasKeyword", "uid", "Id"],
     },
  },
  "accounts": [
      "bob@apache.org" : {
        "name": "bob@apache.org",
        "isPersonal": "true",
        "isReadOnly": "false",
        "capabilities": {...},
      }
  ],
  "primaryAccounts": {
     "urn:ietf:params:jmap:mail": "bob@apache.org"
  },
  "username": "bob@apache.org",
  "apiUrl": "https://example.com/jmap/api",
  "downloadUrl": "https://example.com/jmap/download/{accountId}/{blobId}/{name}?accept={type}",
  "uploadUrl": "https://example.com/jmap/upload/{accountId}",
  "eventSourceUrl": "https://example.com/jmap/eventsource/?types={types}&closeafter={closeafter}&ping={ping}",
  "state": null
}
{code}


*DoD*: implement POJOs and the serializer if needed

  was:
https://jmap.io/spec-core.html#the-jmap-session-resource

{code:java}
curl -XGET /jmap/session

{
  "capabilities": {
     "urn:ietf:params:jmap:core":
       "maxSizeUpload": 10000000,
       "maxConcurrentUpload": 4,
       "maxSizeRequest": 10000000,
       "maxConcurrentRequests": 4,
       "maxCallsInRequest": 16,
       "maxObjectsInGet": 500,
       "maxObjectsInSet": 500,
       "collationAlgorithms": ["i;unicode-casemap"]
     },
     "urn:ietf:params:jmap:mail":
       "maxMailboxesPerEmail": 10000000,
       "maxMailboxDepth": null,
       "maxSizeMailboxName": 200,
       "maxSizeAttachmentsPerEmail": 20000000,
       "mayCreateTopLevelMailbox": true,
       "emailQuerySortOptions": ["receivedAt", "cc", "from", "to", "subject", "size", "sentAt", "hasKeyword", "uid", "Id"],
     },
  },
  "accounts": [
      "bob@apache.org" : {
        "name": "bob@apache.org",
        "isPersonal": "true",
        "isReadOnly": "false",
        "capabilities": {...},
      }
  ],
  "primaryAccounts": {
     "urn:ietf:params:jmap:mail": "bob@apache.org"
  },
  "username": "bob@apache.org",
  "apiUrl": "https://example.com/jmap/api",
  "downloadUrl": "https://example.com/jmap/download/{accountId}/{blobId}/{name}?accept={type}",
  "uploadUrl": "https://example.com/jmap/upload/{accountId}",
  "eventSourceUrl": "https://example.com/jmap/eventsource/?types={types}&closeafter={closeafter}&ping={ping}",
  "state": null
}
{code}

Additional (compulsory?) configuration parameter:
 - `jmap.base.url`: The url from which to derive the session URLs (above `https://example.com/jmap`)

*DOD* serving the session object: using simple auth, bob is able to retrieve his session... (memory integration test)

        Summary: Session pojo and serialization  (was: Implement session object)

> Session pojo and serialization
> ------------------------------
>
>                 Key: JAMES-2890
>                 URL: https://issues.apache.org/jira/browse/JAMES-2890
>             Project: James Server
>          Issue Type: Sub-task
>          Components: JMAP
>            Reporter: Benoit Tellier
>            Assignee: Antoine Duprat
>            Priority: Major
>
> {code:java}
> {
>   "capabilities": {
>      "urn:ietf:params:jmap:core":
>        "maxSizeUpload": 10000000,
>        "maxConcurrentUpload": 4,
>        "maxSizeRequest": 10000000,
>        "maxConcurrentRequests": 4,
>        "maxCallsInRequest": 16,
>        "maxObjectsInGet": 500,
>        "maxObjectsInSet": 500,
>        "collationAlgorithms": ["i;unicode-casemap"]
>      },
>      "urn:ietf:params:jmap:mail":
>        "maxMailboxesPerEmail": 10000000,
>        "maxMailboxDepth": null,
>        "maxSizeMailboxName": 200,
>        "maxSizeAttachmentsPerEmail": 20000000,
>        "mayCreateTopLevelMailbox": true,
>        "emailQuerySortOptions": ["receivedAt", "cc", "from", "to", "subject", "size", "sentAt", "hasKeyword", "uid", "Id"],
>      },
>   },
>   "accounts": [
>       "bob@apache.org" : {
>         "name": "bob@apache.org",
>         "isPersonal": "true",
>         "isReadOnly": "false",
>         "capabilities": {...},
>       }
>   ],
>   "primaryAccounts": {
>      "urn:ietf:params:jmap:mail": "bob@apache.org"
>   },
>   "username": "bob@apache.org",
>   "apiUrl": "https://example.com/jmap/api",
>   "downloadUrl": "https://example.com/jmap/download/{accountId}/{blobId}/{name}?accept={type}",
>   "uploadUrl": "https://example.com/jmap/upload/{accountId}",
>   "eventSourceUrl": "https://example.com/jmap/eventsource/?types={types}&closeafter={closeafter}&ping={ping}",
>   "state": null
> }
> {code}
> *DoD*: implement POJOs and the serializer if needed



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org