Skip to content

Instantly share code, notes, and snippets.

<HTML>
<HEAD>
<TITLE>HTTP Post Binding (Request)</TITLE>
</HEAD>
<BODY Onload="document.forms[0].submit()">
<FORM METHOD="POST" ACTION="http://localhost:8080/auth/realms/saml-demo/protocol/saml">
<INPUT TYPE="HIDDEN" NAME="SAMLRequest" VALUE="PHNhbWxwOkF1dGhuUmVxdWVzdCB4bWxuczpzYW1scD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnByb3RvY29sIiB4bWxucz0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmFzc2VydGlvbiIgQXNzZXJ0aW9uQ29uc3VtZXJTZXJ2aWNlVVJMPSJodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC8iIERlc3RpbmF0aW9uPSJodHRwOi8vbG9jYWxob3N0OjgwODAvYXV0aC9yZWFsbXMvc2FtbC1kZW1vL3Byb3RvY29sL3NhbWwiIEZvcmNlQXV0aG49ImZhbHNlIiBJRD0iSURfYTZlMWVhOGMtN2IzYy00YTg3LTk1MmUtNzhkOWNjOTk3MWNjIiBJc1Bhc3NpdmU9ImZhbHNlIiBJc3N1ZUluc3RhbnQ9IjIwMTUtMDgtMjZUMDg6NTI6NDkuODAyWiIgUHJvdG9jb2xCaW5kaW5nPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YmluZGluZ3M6SFRUUC1QT1NUIiBWZXJzaW9uPSIyLjAiPjxzYW1sOklzc3VlciB4bWxuczpzYW1sPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YXNzZXJ0aW9uIj5odHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC88L3NhbWw6SXNzdWVyPjxzYW1sc

url: http://localhost:8080/auth/realms/saml-demo/protocol/saml?SAMLRequest=jVJdT8IwFP0rS99L9wHCGkaCECMJ6gLogy%2BmbHfSpGtnb4fy7x2bRHwQfWtuz7n3nHPvGEWpKj6t3U6v4K0GdN5HqTTy9iMhtdXcCJTItSgBucv4enq35GHP55U1zmRGkY5yGSwQwTppNPGmp%2BfMaKxLsGuwe5nB42qZkJ1zFWdMmUyonUHHR%2F7IZ1BWyhwAGPHmjUapxZH%2FG1o0dpgFoUpkRx80h9Kwk9y2RLwbYzNojSekEAqBeIt5Qhbzl2EeFIUQWxoXeUT7IipoHAcBjYPM3%2FbzUTgE0YAxbTzJPXzTEWtYaHRCu4SEfjCg%2FoiGVxs%2F5lHE%2Fag3iMJn4qVfQq6lzqV%2BvZzbtgMhv91sUpo%2BrDfEewKLrf0GQCbjox%2FeDrdny%2FvvOiZ%2FJD5mZ%2F27YRW%2Fbxou5qlRMjt4U6XM%2B6zJ2zVZOFtDG24p3GUJx4rMadFCubNCowTtCJt0I3%2Be5eQT

gzip inflate and base64 decode:

<?xml version="1.0" encoding="UTF-8"?>
<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns="urn:oasis:names:tc:SAML:2.0:assertion" AssertionConsumerServiceURL="http://localhost:8080/employee/" Destination="http://localhost:8080/auth/realms/saml-demo/protocol/saml" ForceAuthn="false" ID="ID_7d1ffaab-9fd3-4a3f-9911-91c0b4d827ea" IsPassive="false" IssueInstant="2015-08-26T09:33
@edewit
edewit / gist:8951375
Last active August 29, 2015 13:56
bio

Erik Jan de Wit is a Senior Engineer at JBoss by Red Hat and a responsible for mobile development. Erik Jan created mobile games that used cordova and now uses that know how to support cordova for AeroGear.

Mobile devices are increasingly important as a platform. The number of different devices on the market increases every day. This posses a challenge, how do we support all of them. Every new device comes with it's own paradigms and programming language. Wouldn't it be great if we could create one application that could support all platforms. With Cordova and AeroGear you can.

Cordova is a platform that allows you to access native device functions from JavaScript enabling you to create mobile applications with just CSS, HTML and JavaScript, for all platforms. You can use your existing skill sets to create native applications.

AeroGear, has created native libraries that to develop mobile apps rapidly, but we also support Cordova. So now you can create enterprise grade mobile applications with AeroGear together with Cordova. With support for encrypted databases and one time password Push notifications and much more.

In this talk we'll show how you can create an application with Cordova and even how to create y

var pushConfig = {
// senderID is only used in the Android/GCM case
senderID: "<senderID e.g Google Project ID only for android>",
pushServerURL: "<pushServerURL e.g http(s)//host:port/context >",
variantID: "<variantID e.g. 1234456-234320>",
variantSecret: "<variantSecret e.g. 1234456-234320>",
alias: "<alias e.g. a username or an email address optional>"
}
//badge and sound are iOS specific, and ignored on Android
var pushConfig = {
pushServerURL: "<pushServerURL e.g http(s)//host:port/context >",
alias: "<alias e.g. a username or an email address optional>",
android: {
senderID: "<senderID e.g Google Project ID only for android>",
variantID: "<variantID e.g. 1234456-234320>",
variantSecret: "<variantSecret e.g. 1234456-234320>"
},
ios: {
variantID: "<variantID e.g. 1234456-234320>",

How to build cross platform applications with Cordova

Mobile devices are increasingly important as a platform. The number of different devices on the market increases every day. This posses a challenge, how do we support all of them. Every new device comes with it's own paradigms and programming language. Wouldn't it be great if we could create one application that could support all platforms. With Cordova and AeroGear you can.

Cordova is a platform that allows you to access native device functions from JavaScript enabling you to create mobile applications with just CSS, HTML and JavaScript, for all platforms. You can use your existing skill sets to create native applications.

In this talk we'll show how you can create an application with Cordova and even how to create your own plugins. What features the AeroGear API's have and how you can use these to build mobile applications rapidly. How to create test and run these on simulators and integrate them into your own build environment.

- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView {
self = (GeofencingPlugin*)[super initWithWebView:(UIWebView*)theWebView];
if (self) {
self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self; // Tells the location manager to send updates to this object
}
self.locationManager.distanceFilter = kCLLocationAccuracyBest;
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[self.locationManager startUpdatingLocation];
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@edewit
edewit / command.sh
Created June 30, 2014 09:26
Device registration UPS curl
curl -u 19614a6d-94a4-4788-a0bb-9d559f841b58:221610d0-4668-4379-9db7-29a086c98793 -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"deviceToken":"BSPA91bGDWDdl-xW3EmSs2bH7Qlo5AOfbCJtmyOukYxVHq8KKUqpPLBLUjettGYoN2nahBbAe3GgmxKPcZnqEIFFxHw3_brKOSmeXjZQuEVehSJTUdJuXUCmR3XweZ2MM_455fYMcvkUse1DIp1wjxnik2uHYSNl87wrJzLddoC7tPp-gch3eJAf","alias":"bob","categories":["lead"],"deviceType" : "iPhone", "operatingSystem" : "iOS", "osVersion" : "6.1.2"}' http://localhost:8080/ag-push/rest/registry/device