--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="./gssweb.js"></script>
+ </head>
+ <body>
+ <button id='connect'>Connect</button>
+ <input id='gss_command' />
+ <button id='send-message'>Send</button>
+ <div id='response'></div>
+ </body>
+</html>
--- /dev/null
+
+
+var gssAppPort = null;
+
+function report(msg) {
+ var response = document.getElementById('response');
+ response.innerHTML = '<p>' + msg + '</p>' + response.innerHTML;
+}
+
+function onGSSResponse(msg) {
+ report('Response from GSS: ' + JSON.stringify(msg) );
+}
+
+function connectToNativeHost() {
+ report('Connecting to json_gssapi command line.');
+ // var host = 'com.google.chrome.example.echo';
+ var host = 'com.painlesssecurity.jsongss'
+ gssAppPort = chrome.runtime.connectNative( host );
+ if (gssAppPort) {report("Connected.");};
+ gssAppPort.onMessage.addListener( onGSSResponse );
+}
+
+function sendNativeMessage() {
+ var msg = JSON.parse( document.getElementById('gss_command').value );
+ gssAppPort.postMessage(msg);
+ report('Sent message: ' + msg);
+}
+
+
+document.addEventListener('DOMContentLoaded', function () {
+ document.getElementById('connect').addEventListener(
+ 'click', connectToNativeHost);
+ document.getElementById('send-message').addEventListener(
+ 'click', sendNativeMessage);
+});
--- /dev/null
+{
+ "app": {
+ "launch": {
+ "local_path": "gssweb.html"
+ }
+ },
+ "description": "Chrome plugin to supply GSSAPI calls.",
+ "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyuV9oMZvryLveAqvoFrbQGGU/NOPSFqBymsGLuQKS4i6LfQ/z+pRUTri4r/YWgWvfGGZhjdBy935QWJ0lpfq+dX+XCYSZLzFSllrLB/NM8MI9OQQKeyrnf8ie1pTU92KJGNVAeN7KpgdZjI2G6SNzV6CGz1D7FWkcOyeyk1GWyiFeUc7yEVSTuDhREiD2zEelgc29i9bUh/JZs+yTbWkIkBxdvhBEaU0MJIVyNUhrUbTFANqBu3kigbji+LCb63c0u567jBGkQDtDVS4rstsBwTjuCbCfzppNsMvexrx3kA2FpUj4otHEO2I6W0xlSsv8wza6OFwbV+MISK7CiBmkwIDAQAB",
+ "manifest_version": 2,
+ "name": "GSS Web Plugin",
+ "permissions": [ "nativeMessaging" ],
+ "version": "1.0"
+}
--- /dev/null
+The manifest.json file in this directory will be used by chrome/chromium to
+identify which extensions are allowed to talk to the json_gssapi command
+line executable. This file must (1) be edited correctly, and (2) be placed
+in the correct location.
+
+Editing
+-------------------------------------
+The file contains a path to locate the json_gssapi command. Edit the path
+to be correct for your system.
+
+Installing
+-------------------------------------
+The file must be located in one of three places:
+ global /etc/opt/chrome/native-messaging-hosts
+ Personal:
+ google-chrome ~/.config/google-chrome/NativeMessagingHosts
+ chromium-browser ~/.config/chromium/NativeMessagingHosts
--- /dev/null
+{
+ "name": "com.painlesssecurity.jsongss",
+ "description": "GSSAPI Extension",
+ "path": "/home/mark/projects/gssweb.git/json_gssapi/debug/json_gssapi",
+ "type": "stdio",
+ "allowed_origins": [
+ "chrome-extension://bhaockekcfjjdmbalaanalballokgedd/"
+ ]
+}