aerogear-js CouchDB data-manager adapter
by tolis emmanouilidis
Hi,
I have started working on creating a CouchDB data-manager adapter which
uses the CouchDB REST API. The open-create database, read and save
operations are implemented [1] and tested both with encryption settings and
without encryption settings. If you'd like to give it a try, make sure that
you have enabled CORS on CouchDB side.
The remaining functions that needs to be implemented are remove and filter.
In addition, in order to keep consistent the data-manager API, we should
provide a way to remove all the documents in a CouchDB database-store.
a) Removing all documents in a CouchDB database
I'm thinking of fetching all the docs, using _all_docs endpoint which
returns _id and _rev (revision), mark them as _deleted and use the bulk
insert/update API to delete them. Not sure if this is a proper solution
since there might be a huge number of documents.
Another option would be to delete the database-store. This seems to be the
worst solution since the documents history will be permanently lost.
Any ideas?
b) Filtering
AFAIK, in order to perform filtering in a CouchDB database, a design
document and an appropriate view has to be created. My thought is that the
AGJS adapter should not create the view, instead we should assume that the
user has created the appopriate views and provide a setting in AGJS where
the view endpoint URl can be set.
Any ideas about filtering and the proper way to be implemented?
Thanks,
Tolis
[1]:
https://github.com/tolis-e/aerogear-js/commit/0cf952c36ea0f31aec2a6732d89...
10 years, 4 months
Errors building contacts-mobile-basic - Please help
by keithdmoore94
When trying to build the contacts-mobile-basic app in
https://github.com/sebastienblanc/jboss-wfk-quickstarts.git
Below is the stacktrace. Anybody have a clue as to what the problem is? I
am using maven 3.2.1.
jboss-wfk-quickstarts/contacts-mobile-basic$ mvn clean install -U -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
Downloading:
http://repo.maven.apache.org/maven2/org/jboss/bom/wfk/jboss-javaee-6.0-wi...
Downloading:
http://repo.maven.apache.org/maven2/org/jboss/bom/eap/jboss-javaee-6.0-wi...
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were
encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact
org.jboss.bom.wfk:jboss-javaee-6.0-with-tools:pom:2.5.0-build-2 in central
(http://repo.maven.apache.org/maven2) @ line 72, column 25
[ERROR] Non-resolvable import POM: Could not find artifact
org.jboss.bom.eap:jboss-javaee-6.0-with-hibernate:pom:6.2.0.GA in central
(http://repo.maven.apache.org/maven2) @ line 79, column 25
[ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar
is missing. @ line 92, column 21
[ERROR] 'dependencies.dependency.version' for
org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar is
missing. @ line 99, column 21
[ERROR] 'dependencies.dependency.version' for
org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_1.1_spec:jar is missing. @ line
106, column 21
[ERROR] 'dependencies.dependency.version' for
org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar is missing. @ line
113, column 21
[ERROR] 'dependencies.dependency.version' for
org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar is missing. @ line 120,
column 21
[ERROR] 'dependencies.dependency.version' for
org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar is missing. @
line 127, column 21
[ERROR] 'dependencies.dependency.version' for
org.hibernate:hibernate-validator:jar is missing. @ line 136, column 21
[ERROR] 'dependencies.dependency.version' for
org.hibernate:hibernate-jpamodelgen:jar is missing. @ line 151, column 21
[ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @
line 158, column 21
[ERROR] 'dependencies.dependency.version' for
org.jboss.arquillian.junit:arquillian-junit-container:jar is missing. @ line
166, column 21
[ERROR] 'dependencies.dependency.version' for
org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar is missing. @
line 172, column 21
--
View this message in context: http://aerogear-dev.1069024.n5.nabble.com/Errors-building-contacts-mobile...
Sent from the aerogear-dev mailing list archive at Nabble.com.
10 years, 4 months
contacts-mobile-basic quick start
by Erik Jan de Wit
Hi,
I was working on the aerogear-push-quickstarts for Cordova and was wondering what to put for the alias on registration. The version that is there now has users that logs in and contacts that are fetched. What seems to be missing is that everybody gets all contacts instead of just mine (maybe that is fine), but users that sign up for the app are not contacts. So when I want to send a message to a specific mobile user they are not in my list and there is no way to have to define an alias to send to.
Also the interface for sending push notifications includes a author. I think it would be better if we remove this and let the service put in the logged in user. That way you can’t pretend to send a message like someone else.
What do you think?
Cheers,
Erik Jan
10 years, 4 months
Direct access to UnifiedPush Server's REST without OAuth
by Tadeas Kriz
Hey guys,
as you might know, in the integration tests we only test the REST backend, making sure it works as intended. Before Keycloak, every action was achievable using the REST, that included login, logout and user management. We don’t need the user management for sure, but login and logout is an another story. Now with Keycloak anyone who wants to just use REST calls, still need to login using the Keycloak.
My question is, do we want users to be able to access the REST without OAuth? If we do, it would probably mean we need to have two Keycloak applications, one for the UI which would still use OAuth and second one for REST calls which would use Bearer only. This would also mean that when someone makes a REST call to an endpoint without being authorized, he would receive 401 response, instead of 302 redirect (before Keycloak, the response was 401 in case of unauthorized access).
What do you think?
—
Tadeas Kriz
10 years, 4 months
Roadmap Update (was: Re: [planing] AeroGear Mobile Push 1.0.0 release)
by Matthias Wessendorf
Hello,
I have updated the roadmap towards our Mobile Push 1.0.0 community release
this summer!
https://github.com/aerogear/aerogear.org/pull/307
-Matthias
On Mon, May 12, 2014 at 11:10 AM, Matthias Wessendorf <matzew(a)apache.org>
wrote:
> Hello folks!
>
> This summer we will release the AeroGear Mobile Push 1.0.0 to the
> community. This 'logical' release will contain a few items (that are all on
> their own versioning):
>
> - UnifiedPush Server
> - including Keycloak integration
> - including statistics around Push messages sent out
> - Client SDKs (for Android, Cordova and iOS)
> - Examples/Quickstarts
> - Simple HelloWorld examples (for Android, Cordova and iOS)
> - more advanced Quickstart (different server integration options
> (E.g. JAvaEE and Spring) + Clients for Android, Cordova and iOS)
> - Openshift Cartridge
> - Documentation
>
> To track these items, I have created a JIRA label "MobilePush-1.0", see
> [1]. For new JIRAs that are relevant for this initial community release,
> please use that label so that tracking of the items is much easier ;-)
>
> I will update the existing roadmap (yes, the 1.0.0 is already in there)
> based on current changes and delay's
>
> Thanks!
> Matthias
>
> [1] https://issues.jboss.org/issues/?jql=labels%20%3D%20MobilePush-1.0
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
10 years, 4 months
[QUICKSTART] Information for the mobile clients
by Sebastien Blanc
Hi all,
As we are almost done with the HelloWorlds, I think we can we start on the
Quickstart clients. As a reminder, the Quickstart will consist in a simple
Contact CRUD application with the possibility to send a Push Notification
to one of the listed contacts. Please refer to this
JIRA<https://issues.jboss.org/browse/AGPUSH-604> to
have more information.
The clients will have to communicate against secured REST endpoints. Joshua
and Pedro have started to work on that but nothing official is released
yet. I've tried out their
branch<https://github.com/pedroigor/jboss-wfk-quickstarts/tree/PLINK-392/contact...>
and
IMHO it's good enough to start using it for building our clients, the
restpoints won't change that much I believe.
And because I love you, I deployed on OpenShift a version of this secured
backend to ease the development of the clients !
If you browse to http://contacts-sblanc.rhcloud.com/ you will even see the
mobile web client. This deployed version contains also the Push Message
endpoint.
The branch of this deployed version can be found
here<https://github.com/sebastienblanc/jboss-wfk-quickstarts/tree/push_and_sec...>
.
But let's take a look at the diffrent REST endpoints :
<https://gist.github.com/sebastienblanc/10966803#crud-operations>CRUD
operations
I won't detail them here, since there is already a doc for that :
https://github.com/jboss-developer/jboss-wfk-quickstarts/blob/2.6.x-devel...
<https://gist.github.com/sebastienblanc/10966803#security>Security
*DISCLAIMER* : These might change
<https://gist.github.com/sebastienblanc/10966803#register>REGISTER<https://gist.github.com/sebastienblanc/10966803#register-a-new-user>register
a new user<https://gist.github.com/sebastienblanc/10966803#restsecurityregistration>
/rest/security/registration
- Request type: POST
- Request type: JSON
- Return type: JSON
- Request example:
curl -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H
"Content-type: application/json" -X POST -d
'{"firstName":"Jaime","lastName":"Lannister","userName":"jaime.lannister(a)westerlands.com","password":"hearmeroar"}'
http://contacts-sblanc.rhcloud.com/rest/security/registration
*NOTE* : We should use the convention to use the *email* as userName
<https://gist.github.com/sebastienblanc/10966803#getlogin>GET/LOGIN<https://gist.github.com/sebastienblanc/10966803#rerieve-a-user-and-log-hi...>Rerieve
a user and log him
in<https://gist.github.com/sebastienblanc/10966803#restsecurityuserinfo>
/rest/security/user/info
- Request type: GET
- Request type: JSON
- Auth : Basic Auth
- Return type: JSON
- Request example:
curl -v -b cookies.txt -c cookies.txt -u
"jaime.lannister@westerlands.com:hearmeroar" -H "Accept:
application/json" -H "Content-type: application/json" -X GET
http://contacts-sblanc.rhcloud.com/rest/security/user/info
<https://gist.github.com/sebastienblanc/10966803#logout>LOGOUT<https://gist.github.com/sebastienblanc/10966803#logout-a-user>Logout
a user<https://gist.github.com/sebastienblanc/10966803#restsecurityuserinfo-1>
/rest/security/user/info
- Request type: POST
- Request type: JSON
- Return type: JSON
- Request example:
curl -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H
"Content-type: application/json" -X POST
http://contacts-sblanc.rhcloud.com/rest/security/logout
<https://gist.github.com/sebastienblanc/10966803#push-rest-endpoint>Push
Rest Endpoint
I've added a new endpoint to push a message. In the deployed version, it's
hardcoded for now to send to the "quickstart" application created for the
https://quickstartsups-sblanc.rhcloud.com/ UPS instance, you will also have
to create the appropriate variants.
<https://gist.github.com/sebastienblanc/10966803#registration-with-the-ups...>Registration
with the UPS instance
I think the good flow would be to register with UPS once the login was
successfull. As *alias* the *email*should be passed
<https://gist.github.com/sebastienblanc/10966803#endpoint>Endpoint<https://gist.github.com/sebastienblanc/10966803#restcontactssendmessage>
/rest/contacts/sendMessage
- Request type: POST
- Request type: JSON
- Return type: JSON
- Request example:
curl -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H
"Content-type: application/json" -X POST -d
'{"author":"Jaime","receiver":"john.snow(a)thenorth.com","message":"Winter
is coming !"}' http://contacts-sblanc.rhcloud.com/rest/contacts/sendMessage
So here we can see that we pass data like :
{
"author":"jaime.lannister(a)westerlands.com",
"receiver":"john.snow(a)thenorth.com",
"message":"Winter is coming !"
}
To keep it simple, the client should always pass a hardcoded value for the
message , we don't want (for now)to add any complexity to the clients by
adding an extra dialog to enter custom messages.
author and receiver should contain the emails as we used that for the alias in
UPS.
So, I hope all this will help to boostrap the client's work. Remarks,
questions ?
(the content of this email is available
here<https://gist.github.com/sebastienblanc/10966803>
)
Sebi
10 years, 4 months
Java Sender 0.7.0 has been staged (was: Re: Java-Sender release?)
by Matthias Wessendorf
Hello,
the version 0.7.0 of the Java Sender has been staged. The staging
repository is located here:
http://repository.jboss.org/nexus/content/repositories/jboss_releases_sta...
Changes since the last release:
* BOM and AeroGear-Parent update
* Java client: submit request header on sending (AGPUSH-682)
* Switching to com.fasterxml.jackson
* Refactoring of SenderClient and JavaSender
If nothing bad has been reported, I will release the bits by Thursday
afternoon (EU time)
Cheers!
Matthias
On Tue, Jun 3, 2014 at 8:57 AM, Matthias Wessendorf <matzew(a)apache.org>
wrote:
> that's already in :-)
>
>
> On Tue, Jun 3, 2014 at 8:50 AM, Sebastien Blanc <scm.blanc(a)gmail.com>
> wrote:
>
>> I was thinking the same, I would like to include
>> https://github.com/aerogear/aerogear-unifiedpush-java-client/pull/39 and
>> https://github.com/aerogear/aerogear-unifiedpush-java-client/pull/40
>>
>>
>> On Tue, Jun 3, 2014 at 8:49 AM, Matthias Wessendorf <matzew(a)apache.org>
>> wrote:
>>
>>> Hi,
>>>
>>> based on recent changes, I think it's good time to release the client
>>> version 0.7.0.
>>>
>>> Any concerns against such a release ?
>>>
>>> --
>>> Matthias Wessendorf
>>>
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> sessions: http://www.slideshare.net/mwessendorf
>>> twitter: http://twitter.com/mwessendorf
>>>
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> aerogear-dev(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
10 years, 4 months