Skip to content

Instantly share code, notes, and snippets.

@k33g
Created February 28, 2011 08:04
Show Gist options
  • Save k33g/847056 to your computer and use it in GitHub Desktop.
Save k33g/847056 to your computer and use it in GitHub Desktop.
Authentication-01
package controllers;
import play.mvc.*;
@With(Secure.class)
public class Authenticated extends Controller{
public static void itIsOk(){
renderHtml(
"<script>"+
"window.addEventListener('message', handleParentMessage, false);" +
"function handleParentMessage(e){console.log(e);}" +
"window.parent.postMessage('authenticated', '*');"+
"</script>"
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment