controllers
Class AuthFileSecurity

java.lang.Object
  extended by play.mvc.Controller
      extended by controllers.Secure.Security
          extended by controllers.AuthFileSecurity
All Implemented Interfaces:
play.classloading.enhancers.ControllersEnhancer.ControllerSupport, play.classloading.enhancers.LocalvariablesNamesEnhancer.LocalVariablesSupport

public class AuthFileSecurity
extends Secure.Security

This Class provides basice Security Functions for the Play! Security Plugin.


Field Summary
 
Fields inherited from class play.mvc.Controller
_currentReverse, flash, params, renderArgs, request, response, routeArgs, session, validation
 
Constructor Summary
AuthFileSecurity()
           
 
Method Summary
static boolean authentify(java.lang.String username, java.lang.String password)
          Authentify an user against the given AuthFile.
static boolean check(java.lang.String profile)
          Checks if the current user (that is loged in) has the profile (e.g.
 
Methods inherited from class play.mvc.Controller
await, await, await, await, await, await, badRequest, checkAuthenticity, error, error, error, error, flash, forbidden, forbidden, getActionAnnotation, getControllerAnnotation, getControllerClass, getControllerInheritedAnnotation, notFound, notFound, notFoundIfNull, notFoundIfNull, notModified, ok, parent, parent, parent, redirect, redirect, redirect, redirect, redirectToStatic, render, renderBinary, renderBinary, renderBinary, renderBinary, renderBinary, renderBinary, renderBinary, renderBinary, renderBinary, renderBinary, renderHtml, renderJSON, renderJSON, renderJSON, renderJSON, renderTemplate, renderTemplate, renderTemplate, renderText, renderText, renderXml, renderXml, renderXml, renderXml, reverse, suspend, suspend, template, template, templateExists, todo, unauthorized, unauthorized, waitFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthFileSecurity

public AuthFileSecurity()
Method Detail

authentify

public static boolean authentify(java.lang.String username,
                                 java.lang.String password)
Authentify an user against the given AuthFile.

Parameters:
username - the given username.
password - the given password.
Returns:
true if username and password matches, otherwise false.

check

public static boolean check(java.lang.String profile)
Checks if the current user (that is loged in) has the profile (e.g. is in the group).

Parameters:
profile -
Returns:
true if the current user has the profile, otherwise false.