Skip to content

Instantly share code, notes, and snippets.

// Copyright (C) 2011 RiSK (sscrisk)
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#if !defined(SSCRISK_DEMANGLE_HPP)
#define SSCRISK_DEMANGLE_HPP
#if defined(_MSC_VER) && _MSC_VER >= 1020
#pragma once
@takumakei
takumakei / BasicRealm.scala
Created December 10, 2012 05:05 — forked from guillaumebort/Secured.scala
HTTP Basic Authorization for Play 2.0
import org.apache.commons.codec.binary.Base64.decodeBase64
import play.api._
import play.api.mvc._
trait BasicRealm {
def name: String
def authorize(user: String, password: String): Boolean
}
object BasicRealm extends Controller {