Skip to content

Instantly share code, notes, and snippets.

@k33g
Created March 1, 2011 01:35
Show Gist options
  • Select an option

  • Save k33g/848432 to your computer and use it in GitHub Desktop.

Select an option

Save k33g/848432 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