Resource
└─Secret
public class Secret
extends Resource
Fields inherited from Tonic\Resource | |
---|---|
params |
Method Summary | |
---|---|
void | mySecret() |
void | secure(mixed username, mixed password) |
Methods inherited from Tonic\Resource | |
---|---|
__construct, accepts, after, before, cache, exec, lang, method, priority, provides |
public void mySecret()
public void secure(mixed username, mixed password)
Simple HTTP authentication example.
The condition annotation @secure maps to the secure() method allowing us to easily secure the mySecret() method with the given username and password