Skip to content
mslinn edited this page Feb 4, 2013 · 3 revisions

Welcome to the securesocial wiki!

Tips and Tricks

  1. You can detect if the user is authenticated in a view using the following code. This example could be placed in a template, so all your pages would have a Login or Logout link:
@defining(request.getClass.getName) { reqClassName =>
  @if(reqClassName.contains("SecureSocial") || reqClassName.contains("SecuredRequest")){
    <a href="/logout">Logout</a>
  }else{
    <a href="/login">Login</a>
  }
}
Clone this wiki locally