# -*- coding: utf-8 -*-
"""
This is an example controller demonstrating one way to
use AuthKit to restrict access
"""

import logging

from pylons import request, response

from {{package}}.lib.base import BaseController, render
from authkit.permissions import RemoteUser

log = logging.getLogger(__name__)


permissions = RemoteUser()

class AuthController(BaseController):

    def private(self):
        if request.environ.get("REMOTE_USER"):
            return "You are authenticated!"
        else:
            response.status = "401 Not authenticated"
            return "You are not authenticated"
    

    def signout(self):
        return "Successfully signed out!"
    