From a1e051fe9de0ce994f7e81a9dc19a0d4d1f77706 Mon Sep 17 00:00:00 2001 From: Ronald Ray Date: Wed, 26 Dec 2018 12:02:31 -0800 Subject: [PATCH] Updated Readme. cassproject/cass#111 --- README.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 15f55cc..454032a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,51 @@ +[![Build Status](https://travis-ci.org/cassproject/cass-profile.svg?branch=master)](https://travis-ci.org/cassproject/cass-profile) # cass-profile -View a learner's profile using CASS. +Competency and Skills Service -- Profile Explorer + +View your or another's profile and share assertions with your contacts. + +# Features + * View your profile across all competency frameworks. + * Navigate your profile and understand what assertions and evidence contribute to it. + * Share assertions by compiling them into profiles and sharing them with others. + * Customizable - Change the default behavior of the cass-align via post messages. + * Unbranded and open source - Carries no branding information, allowing you to use it easily and without concern. + +# Try it out +cass-profile is available for use in default installations as part of the Framework Viewer. + +# Integration +Integrate the cass-profile into your website by nesting it into an iframe on your website. + +```html + + +``` + +# URL Parameters +To ensure the iframe is passing the correct origin, pass the origin into the iframe using a URL parameter, `origin=window.location.origin`. + +# Post Messages +CASS can operate using credentials and signals provided by the parent site. These credentials are passed into the iframe via a message, in order to avoid transmitting them over HTTP. Wait for a `{message:"waiting"}` message to be posted from the iframe. +```javascript +$("iframe").ready(function () { + $(window).on("message", function (event) { + if (event.originalEvent.data.message == "waiting") { + //Initialize the server and identity + //Set framework alignment parameters + } + }); +}); +``` +## Setting the server +You must set the server and the identity to be used when accessing the server. +```javascript +$("iframe")[0].contentWindow.postMessage(JSON.stringify({ + action: "initIdentity", + serverParm: selectedServer, + nameParm: loggedInIdentityName, + pemParm: loggedInPpkPem +}), window.location.origin); +``` \ No newline at end of file