Skip to content

Instantly share code, notes, and snippets.

View matzew's full-sized avatar
💩
hacking hacking hacking!

Matthias Wessendorf matzew

💩
hacking hacking hacking!
  • Red Hat
  • Emsdetten, Germany
View GitHub Profile
@matzew
matzew / gist:b7514e4a3d9402d1100b
Created August 19, 2014 07:45
jboss7 profile - test failures
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.jboss.aerogear.aerodoc.rest.SaleAgentEndpointTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.407 sec <<< FAILURE!
org.jboss.aerogear.aerodoc.rest.SaleAgentEndpointTest Time elapsed: 406 sec <<< ERROR!
java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor
at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:160)
at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:111)
at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:97)
@matzew
matzew / gist:77f296ea25f3a83dc937
Created August 19, 2014 11:16
PicketLink CDI issues
13:15:08,618 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."jboss-contacts-mobile-picketlink-secured.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."jboss-contacts-mobile-picketlink-secured.war".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1936) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
Caused by: org.jboss.weld.exceptions.DeploymentException: Exception List with 3 exceptions:
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [IdentityManager] with qualifiers [@Default] at inject
"message":
{
"key":"value",
"key2":"other value",
"alert":"HELLO!",
"action-category":"some value",
"sound":"default",
"badge":2,
"content-available" : true,
"simplepush":"version=123"
Your application 'testtest' is now available.
URL: http://testtest-pushee.rhcloud.com/
SSH to: 53f7544a4382ec4efc0005df@testtest-pushee.rhcloud.com
Git remote: ssh://53f7544a4382ec4efc0005df@testtest-pushee.rhcloud.com/~/git/testtest.git/
Run 'rhc show-app testtest' for more details about your app.
@matzew
matzew / gist:78c75265d64c5a61e2ab
Created September 6, 2014 19:54
WildFly-Marathon
{
"id": "wildfly8alone",
"cmd": "cd wildfly-* && sed \"s/8080/$PORT/g\" < ./standalone/configuration/standalone.xml > ./standalone/configuration/standalone-mesos.xml && ./bin/standalone.sh -c ./standalone/configuration/standalone-mesos.xml",
"mem": 1024,
"cpus": 1.0,
"instances": 1,
"uris": [
"https://repository.jboss.org/nexus/content/repositories/public-jboss/org/wildfly/wildfly-dist/8.1.0.Final/wildfly-dist-8.1.0.Final.tar.gz"
]
}
{
"id": "ups1.0.0",
"cmd": "mv aerogear-unifiedpush-server-1.0.0.Final/databases/unifiedpush-h2-ds.xml wildfly-8.1.0.Final/standalone/deployments && mv aerogear-unifiedpush-server-1.0.0.Final/servers/unifiedpush-auth-server.war wildfly-8.1.0.Final/standalone/deployments && mv aerogear-unifiedpush-server-1.0.0.Final/servers/unifiedpush-server-wildfly.war wildfly-8.1.0.Final/standalone/deployments && cd wildfly-8.1.0.Final && sed \"s/8080/$PORT/g\" < ./standalone/configuration/standalone.xml > ./standalone/configuration/standalone-mesos.xml && ./bin/standalone.sh -b 0.0.0.0 -c standalone-mesos.xml",
"mem": 1024,
"cpus": 1.0,
"instances": 1,
"uris": [
"http(s):// _OR_ file:///PATH/TO/DOWNLOAD/OF/wildfly-8.1.0.Final.zip",
"http(s):// _OR_ file:///PATH/TO/DOWNLOAD/OF/aerogear-unifiedpush-server-1.0.0.Final-dist.zip"
]

User Management via Keycloak for the AeroGear Unfied Push Server

Introduction

The goal of this document is to describe how the User Management (based on Keycloak) will be implemented in the UnifiedPush Server. Currently there is only one user (admin) created by default when installing UPS. Having the possibility to create multiple (non-admin) users via the Keycloak Admin Console is a Must Have. Some roles should also be introduced.

Roles / Permissions

diff --git a/libs/AeroGearHttp/Http.swift b/libs/AeroGearHttp/Http.swift
index db0b622..1b1504e 100644
--- a/libs/AeroGearHttp/Http.swift
+++ b/libs/AeroGearHttp/Http.swift
@@ -37,7 +37,7 @@ public class Http {
}
public init(url: String, sessionConfig: NSURLSessionConfiguration, requestSerializer: RequestSerializer, responseSerializer: ResponseSerializer) {
- self.baseURL = NSURL.URLWithString(url)
+ self.baseURL = NSURL(fileURLWithPath: url)!
@matzew
matzew / gist:3a20f80535dd3fe0c98e
Created October 16, 2014 08:42
KC-1.0.2 warnings on EAP.6.3-GA
08:28:20,568 WARN [org.jboss.resteasy.core.ResourceLocator] (http-/127.0.0.1:8080-7) Field uriInfo of subresource org.keycloak.services.resources.PublicRealmResource will not be injected according to spec
08:28:20,568 WARN [org.jboss.resteasy.core.ResourceLocator] (http-/127.0.0.1:8080-7) Field request of subresource org.keycloak.services.resources.PublicRealmResource will not be injected according to spec
08:28:20,569 WARN [org.jboss.resteasy.core.ResourceLocator] (http-/127.0.0.1:8080-7) Field response of subresource org.keycloak.services.resources.PublicRealmResource will not be injected according to spec
08:28:20,823 WARN [org.jboss.resteasy.core.ResourceLocator] (http-/127.0.0.1:8080-4) Field providers of subresource org.keycloak.services.resources.TokenService will not be injected according to spec
08:28:20,823 WARN [org.jboss.resteasy.core.ResourceLocator] (http-/127.0.0.1:8080-4) Field securityContext of subresource org.keycloak.services.resources.TokenService will not be injected according to sp
ApnsService service =
APNS.newService()
.withCert("/path/to/production_certificate.p12", "MyProdCertPassword")
.withProductionDestination()
.withDelegate(new ApnsDelegate() {
@Override
public void messageSent(ApnsNotification message, boolean resent) {
}