This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.util._ | |
import java.security.SecureRandom | |
import java.security.MessageDigest | |
/* | |
* Generates a Bearer Token with a length of | |
* 32 characters (MD5) or 64 characters (SHA-256) according to the | |
* specification RFC6750 (http://tools.ietf.org/html/rfc6750) | |
* | |
* Uniqueness obtained by by hashing system time combined with a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Usage: | |
# class ApplicationController < ActionController::Base | |
# include ErrorPages | |
# end | |
# | |
require 'active_support/core_ext/array/extract_options' | |
module ErrorPages | |
extend ActiveSupport::Concern |