1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-02-09 13:47:09 +02:00

Add query param to Register to allow for setting of primaryID

- Usefull when linking user to register page from email and you don't want
  them to change their email
This commit is contained in:
Kris Runzer 2015-10-28 14:13:21 -07:00
parent b09e4831b6
commit b519034670
2 changed files with 170 additions and 149 deletions

View File

@ -1,3 +1,15 @@
// Code generated by go-bindata.
// sources:
// templates/confirm_email.html.tpl
// templates/confirm_email.txt.tpl
// templates/login.html.tpl
// templates/recover.html.tpl
// templates/recover_complete.html.tpl
// templates/recover_email.html.tpl
// templates/recover_email.txt.tpl
// templates/register.html.tpl
// DO NOT EDIT!
package response
import (
@ -5,15 +17,14 @@ import (
"compress/gzip"
"fmt"
"io"
"strings"
"os"
"time"
"io/ioutil"
"path"
"os"
"path/filepath"
"strings"
"time"
)
func bindata_read(data []byte, name string) ([]byte, error) {
func bindataRead(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
@ -21,11 +32,14 @@ func bindata_read(data []byte, name string) ([]byte, error) {
var buf bytes.Buffer
_, err = io.Copy(&buf, gz)
gz.Close()
clErr := gz.Close()
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
}
if clErr != nil {
return nil, err
}
return buf.Bytes(), nil
}
@ -35,189 +49,189 @@ type asset struct {
info os.FileInfo
}
type bindata_file_info struct {
name string
size int64
mode os.FileMode
type bindataFileInfo struct {
name string
size int64
mode os.FileMode
modTime time.Time
}
func (fi bindata_file_info) Name() string {
func (fi bindataFileInfo) Name() string {
return fi.name
}
func (fi bindata_file_info) Size() int64 {
func (fi bindataFileInfo) Size() int64 {
return fi.size
}
func (fi bindata_file_info) Mode() os.FileMode {
func (fi bindataFileInfo) Mode() os.FileMode {
return fi.mode
}
func (fi bindata_file_info) ModTime() time.Time {
func (fi bindataFileInfo) ModTime() time.Time {
return fi.modTime
}
func (fi bindata_file_info) IsDir() bool {
func (fi bindataFileInfo) IsDir() bool {
return false
}
func (fi bindata_file_info) Sys() interface{} {
func (fi bindataFileInfo) Sys() interface{} {
return nil
}
var _confirm_email_html_tpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb2\xc9\x30\xb4\x73\xce\xcf\x4b\xcb\x2c\xca\x55\xa8\xcc\x2f\x2d\x52\x48\x4c\x4e\xce\x2f\xcd\x2b\xb1\xd1\x07\x4a\x70\xd9\x24\x15\x29\xe8\x03\xa9\x02\xbb\x80\x9c\xd4\xc4\xe2\x54\x85\xe4\x9c\xcc\xe4\x6c\x05\x9b\x44\x85\x8c\xa2\xd4\x34\x5b\xa5\xea\x6a\xbd\xda\x5a\x25\xa0\x92\x8c\xd4\xa2\x54\x1b\xfd\x44\x3b\x85\x92\x7c\x85\x64\xac\xc6\x15\xd8\x71\x01\x02\x00\x00\xff\xff\xd9\xba\x4f\x59\x6c\x00\x00\x00")
var _confirm_emailHtmlTpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb2\xc9\x30\xb4\x73\xce\xcf\x4b\xcb\x2c\xca\x55\xa8\xcc\x2f\x2d\x52\x48\x4c\x4e\xce\x2f\xcd\x2b\xb1\xd1\x07\x4a\xf0\x72\xd9\x24\x15\x29\xe8\x83\xe8\x02\xbb\x80\x9c\xd4\xc4\xe2\x54\x85\xe4\x9c\xcc\xe4\x6c\x05\x9b\x44\x85\x8c\xa2\xd4\x34\x5b\xa5\xea\x6a\xbd\xda\x5a\x25\xa0\x9a\x8c\xd4\xa2\x54\x1b\xfd\x44\x3b\x85\x92\x7c\x85\x64\xac\x06\x16\x00\xcd\x01\x04\x00\x00\xff\xff\xe5\x3a\xff\x49\x6f\x00\x00\x00")
func confirm_email_html_tpl_bytes() ([]byte, error) {
return bindata_read(
_confirm_email_html_tpl,
func confirm_emailHtmlTplBytes() ([]byte, error) {
return bindataRead(
_confirm_emailHtmlTpl,
"confirm_email.html.tpl",
)
}
func confirm_email_html_tpl() (*asset, error) {
bytes, err := confirm_email_html_tpl_bytes()
func confirm_emailHtmlTpl() (*asset, error) {
bytes, err := confirm_emailHtmlTplBytes()
if err != nil {
return nil, err
}
info := bindata_file_info{name: "confirm_email.html.tpl", size: 108, mode: os.FileMode(438), modTime: time.Unix(1425861488, 0)}
a := &asset{bytes: bytes, info: info}
info := bindataFileInfo{name: "confirm_email.html.tpl", size: 111, mode: os.FileMode(438), modTime: time.Unix(1443044716, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _confirm_email_txt_tpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x24\xc8\xd1\x0d\x82\x40\x10\x04\xd0\x56\xa6\x02\x6b\xb1\x00\x7e\xce\x73\xd1\x8d\xeb\x0c\xd9\x5b\x42\x08\xa1\x77\x4d\xf8\x7c\xef\x1e\xd6\x86\xa1\x6b\xd9\xd1\xf8\xc4\xd2\x46\x19\xea\x6d\x98\x15\xa1\xcd\xf9\x42\x38\x3f\x70\x96\xb0\x6b\x4d\x3c\x52\xdb\xb0\xc4\xdf\x5d\x9c\x3d\xbf\xd7\xb7\xde\xb5\xb2\x26\x4e\x3c\x8e\xdb\x79\xfe\x02\x00\x00\xff\xff\x66\x27\xac\x6d\x5b\x00\x00\x00")
var _confirm_emailTxtTpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x24\xc8\xd1\x0d\x82\x40\x10\x04\xd0\x56\xa6\x02\x6b\xb1\x00\x7e\xce\x73\xd1\x8d\xeb\x0c\xd9\x5b\x42\x08\xa1\x77\x4d\xf8\x7c\xef\x1e\xd6\x86\xa1\x6b\xd9\xd1\xf8\xc4\xd2\x46\x19\xea\x6d\x98\x15\xa1\xcd\xf9\x42\x38\x3f\x70\x96\xb0\x6b\x4d\x3c\x52\xdb\xb0\xc4\xdf\x5d\x9c\x3d\xbf\xd7\xb7\xde\xb5\xb2\x26\x4e\x3c\x8e\xdb\x79\xfe\x02\x00\x00\xff\xff\x66\x27\xac\x6d\x5b\x00\x00\x00")
func confirm_email_txt_tpl_bytes() ([]byte, error) {
return bindata_read(
_confirm_email_txt_tpl,
func confirm_emailTxtTplBytes() ([]byte, error) {
return bindataRead(
_confirm_emailTxtTpl,
"confirm_email.txt.tpl",
)
}
func confirm_email_txt_tpl() (*asset, error) {
bytes, err := confirm_email_txt_tpl_bytes()
func confirm_emailTxtTpl() (*asset, error) {
bytes, err := confirm_emailTxtTplBytes()
if err != nil {
return nil, err
}
info := bindata_file_info{name: "confirm_email.txt.tpl", size: 91, mode: os.FileMode(438), modTime: time.Unix(1425861619, 0)}
a := &asset{bytes: bytes, info: info}
info := bindataFileInfo{name: "confirm_email.txt.tpl", size: 91, mode: os.FileMode(438), modTime: time.Unix(1443044716, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _login_html_tpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x7c\x92\xcb\x6e\xeb\x20\x10\x86\xf7\x91\xf2\x0e\x88\xfd\x89\x5f\xc0\xb6\x74\xa4\xb3\x39\x52\x2f\x51\x1b\x75\x5b\x61\x3c\x0e\x28\x06\xac\x61\x9c\x8b\x90\xdf\xbd\xa6\x76\x5a\xd3\x46\xf1\xca\x0c\x3f\x1f\x1f\x30\x21\x6c\x9a\x56\x78\xf5\xee\x7b\x29\xc1\xfb\x61\x58\xaf\xf2\xc6\xa1\x61\x42\x92\x76\xb6\xe0\x21\x18\xd7\x5b\xea\x04\x29\xa8\x19\x6f\xdd\x5e\x5b\x3e\x0c\x9c\x19\x20\xe5\xea\x82\x6f\x9f\x5f\x77\xbc\x5c\xaf\xd8\xf8\x85\xa0\x1b\xb6\x01\x44\x87\xc3\x30\xb2\xe7\xbf\xbc\x42\x96\x95\x21\x80\xad\xe3\x06\x31\x99\x6b\xdb\xf5\xc4\xe8\xd2\x41\xc1\x09\xce\xc4\x99\x1c\x45\x7c\xc1\xe3\xee\x7f\xa4\xb3\x84\xae\xe5\xcc\x0a\x03\x51\x62\xd3\xa1\x36\x02\x2f\xff\xff\xc5\xbd\xbb\x56\x48\x50\xae\xad\x01\xe3\x24\x69\x6a\x81\xa5\x91\xa3\x68\xfb\x1f\x2b\xdf\x62\x69\x9c\x2b\x27\x9f\x44\x64\x36\xe9\x46\x85\x93\xc3\xfa\xae\xcd\x77\x28\xf1\xd8\x5e\xcb\xb7\xf8\x13\x5e\xe9\xba\x06\xbb\x38\xd5\xd9\x63\xf3\x34\x0e\x52\xe3\x58\xdd\xb9\x03\xd8\x58\xce\x92\xbb\xf5\xca\x9d\x5e\xc0\x80\xa9\x20\x5e\xec\x12\x2e\x15\xc8\x43\xe5\xce\x57\x3c\x9a\x2f\x26\x61\x0f\xbc\x64\xd7\x85\xec\x11\xd2\xc7\xa8\x7a\x22\x67\x67\x8e\xef\x2b\xa3\x89\x97\x0f\xf1\xa9\xf3\x6c\x9a\x4b\xce\xb4\x54\x91\xee\xf8\x69\x22\x98\x42\x68\x7e\xf5\x0b\x4e\x81\xd8\x31\xe5\x1c\x66\x7f\xa5\x8c\x91\x3c\x13\x69\x4f\x2c\xb1\x7b\xed\xe9\x3e\x77\x4a\xcc\xe0\x69\x70\x93\x9c\x67\xf1\x0d\xcb\x8f\x00\x00\x00\xff\xff\x66\x78\xba\x32\xea\x02\x00\x00")
var _loginHtmlTpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x7c\x92\xcb\x6e\xeb\x20\x10\x86\xf7\x91\xf2\x0e\x88\xfd\x89\x5f\xc0\xb6\x74\xa4\xb3\x39\x52\x2f\x51\x1b\x75\x5b\x61\x3c\x0e\x28\x06\xac\x61\x9c\x8b\x90\xdf\xbd\xa6\x76\x5a\xd3\x46\xf1\xca\x0c\x3f\x1f\x1f\x30\x21\x6c\x9a\x56\x78\xf5\xee\x7b\x29\xc1\xfb\x61\x58\xaf\xf2\xc6\xa1\x61\x42\x92\x76\xb6\xe0\x21\x18\xd7\x5b\xea\x04\x29\xa8\x19\x6f\xdd\x5e\x5b\x3e\x0c\x9c\x19\x20\xe5\xea\x82\x6f\x9f\x5f\x77\xbc\x5c\xaf\xd8\xf8\x85\xa0\x1b\xb6\x01\x44\x87\xc3\x30\xb2\xe7\xbf\xbc\x42\x96\x95\x21\x80\xad\xe3\x06\x31\x99\x6b\xdb\xf5\xc4\xe8\xd2\x41\xc1\x09\xce\xc4\x99\x1c\x45\x7c\xc1\xe3\xee\x7f\xa4\xb3\x84\xae\xe5\xcc\x0a\x03\x51\x62\xd3\xa1\x36\x02\x2f\xff\xff\xc5\xbd\xbb\x56\x48\x50\xae\xad\x01\xe3\x24\x69\x6a\x81\xa5\x91\xa3\x68\xfb\x1f\x2b\xdf\x62\x69\x9c\x2b\x27\x9f\x44\x64\x36\xe9\x46\x85\x93\xc3\xfa\xae\xcd\x77\x28\xf1\xd8\x5e\xcb\xb7\xf8\x13\x5e\xe9\xba\x06\xbb\x38\xd5\xd9\x63\xf3\x34\x0e\x52\xe3\x58\xdd\xb9\x03\xd8\x58\xce\x92\xbb\xf5\xca\x9d\x5e\xc0\x80\xa9\x20\x5e\xec\x12\x2e\x15\xc8\x43\xe5\xce\x57\x3c\x9a\x2f\x26\x61\x0f\xbc\x64\xd7\x85\xec\x11\xd2\xc7\xa8\x7a\x22\x67\x67\x8e\xef\x2b\xa3\x89\x97\x0f\xf1\xa9\xf3\x6c\x9a\x4b\xce\xb4\x54\x91\xee\xf8\x69\x22\x98\x42\x68\x7e\xf5\x0b\x4e\x81\xd8\x31\xe5\x1c\x66\x7f\xa5\x8c\x91\x3c\x13\x69\x4f\x2c\xb1\x7b\xed\xe9\x3e\x77\x4a\xcc\xe0\x69\x70\x93\x9c\x67\xf1\x0d\xcb\x8f\x00\x00\x00\xff\xff\x66\x78\xba\x32\xea\x02\x00\x00")
func login_html_tpl_bytes() ([]byte, error) {
return bindata_read(
_login_html_tpl,
func loginHtmlTplBytes() ([]byte, error) {
return bindataRead(
_loginHtmlTpl,
"login.html.tpl",
)
}
func login_html_tpl() (*asset, error) {
bytes, err := login_html_tpl_bytes()
func loginHtmlTpl() (*asset, error) {
bytes, err := loginHtmlTplBytes()
if err != nil {
return nil, err
}
info := bindata_file_info{name: "login.html.tpl", size: 746, mode: os.FileMode(438), modTime: time.Unix(1428692472, 0)}
a := &asset{bytes: bytes, info: info}
info := bindataFileInfo{name: "login.html.tpl", size: 746, mode: os.FileMode(438), modTime: time.Unix(1443044716, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _recover_html_tpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x52\x4d\x6f\xe2\x30\x10\xbd\xf3\x2b\x46\x16\x7b\x25\xf7\x95\x93\x0b\x7b\xd9\x4b\x8b\x5a\xd4\x6b\x65\x92\x09\xb1\x6a\x8f\x2d\x67\x42\x41\x6e\xfe\x7b\x6d\x82\x10\xb4\x12\xa8\x87\xe6\x90\xcc\xc7\x7b\x6f\x32\x4f\x23\x5b\x17\x2c\xa8\x9a\xb5\xa3\x52\xc4\x68\xdd\x40\xec\x15\x77\xd8\x80\x08\x58\xbb\x1d\x06\x31\x8e\x02\x2c\x72\xe7\x9a\x52\xac\x1e\x9f\xd7\xa2\x9a\x41\x7a\xa4\x26\x3f\x30\xf0\xc1\x63\x29\x18\xf7\x2c\x80\x94\xc5\x2c\xb3\xf0\x41\x5b\x15\x0e\xff\xff\x65\xae\x37\xaa\xc6\xce\x99\x06\x43\x6e\xb2\x66\x83\x70\x0d\xd9\x29\x33\x7c\x61\xbe\xe4\x52\xee\x15\x95\xdc\x84\xf4\x3e\x0e\x8d\x71\xee\x75\x03\x7f\xcb\x2b\x81\x18\xdf\x35\x77\xb0\xc0\x10\xfa\x73\x36\x4f\x99\xd1\x3d\x67\xb0\xa6\x06\xf7\xb0\x80\x4c\xce\x80\xa0\x68\x8b\x67\xc4\x38\xca\xde\x2b\xaa\xd2\xf8\x14\x16\xc7\x78\x9a\x19\x23\xd2\x91\x70\xf9\xb9\xbd\x7d\xed\xa8\xd5\xc1\xbe\xde\x74\x61\x39\x81\xe0\x9e\x1b\x27\xb1\xd5\x5d\x53\xea\x6f\xae\xc0\x07\xa4\x98\xb8\x85\xf3\x2f\xfd\xe9\xc5\x4f\xbc\xaa\x7f\xc7\xac\x4e\x37\x0d\xd2\xc5\xb1\xec\xfb\xd0\x3e\xa4\xe4\x7a\xf5\x5c\x5d\xbb\x37\xa4\x69\xdd\x49\x67\x33\x30\x3b\x3a\x09\xf5\xc3\xc6\x6a\x16\xd5\xd3\x74\xa7\xb2\x98\xba\x97\xce\x48\x05\x5d\xc0\xb6\x14\x85\x71\x5b\x4d\xa2\x5a\x2a\xaa\xd1\xc8\x42\x55\x33\x59\xe4\xe3\xaf\x3e\x03\x00\x00\xff\xff\xa8\x01\x1f\xc8\x03\x03\x00\x00")
var _recoverHtmlTpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x53\xb1\x6e\xe3\x30\x0c\xdd\x0f\xb8\x7f\x20\x84\xdc\x1a\xef\x07\xd9\x4b\x6e\xb9\xa5\x0d\xda\xa0\x6b\xa1\xd8\x74\x2c\x54\xa2\x04\x99\x4e\x13\xa8\xfe\xf7\x4a\x71\x10\xc4\x2d\xd0\xa0\x43\x3d\xd8\xa4\xf8\xde\xa3\xf9\x40\xc9\xd6\x05\x0b\xaa\x66\xed\xa8\x14\x31\x5a\x37\x10\x7b\xc5\x1d\x36\x20\x02\xd6\x6e\x8f\x41\x8c\xa3\x00\x8b\xdc\xb9\xa6\x14\xeb\xfb\xc7\x8d\xa8\x7e\xff\x82\xf4\x48\x4d\x7e\x60\xe0\xa3\xc7\x52\x30\x1e\x58\x00\x29\x8b\x59\x67\xe9\x83\xb6\x2a\x1c\xff\xff\xcb\x64\x6f\x54\x8d\x9d\x33\x0d\x86\x5c\x64\xcd\x06\x61\x0e\xd9\x2b\x33\x7c\x60\x3e\xe5\xa3\x5c\x2b\x2a\xb9\x0d\xe9\x3d\x75\x8d\x71\xe1\x75\x03\x7f\xcb\x99\x42\x8c\xaf\x9a\x3b\x58\x62\x08\xfd\x25\x5b\xa4\xcc\xe8\x9e\x33\x58\x53\x83\x07\x58\x42\x26\x67\x40\x50\xb4\xc3\x0b\x62\x1c\x65\xef\x15\x55\xa9\x7f\x0a\x8b\x53\x3c\x35\x8d\x11\xe9\x44\xb8\xfe\xdc\x98\xbf\x76\xd4\xea\x60\x9f\xbf\xf4\x61\x35\x81\xe0\x96\x1f\x67\xb1\xf5\x6d\x5b\xea\x4f\xbe\xc0\x1b\xa4\x98\xb8\x85\xcb\x3f\xfd\xe9\xc5\x77\xdc\xaa\x7f\xc8\xae\x4e\x37\x0d\xd2\xd5\xc2\x1c\xfa\xd0\xde\xa5\x64\x3e\x7c\x3e\xdd\xb8\x17\xa4\x69\xe0\xb3\xd0\x76\x60\x76\x74\x56\xea\x87\xad\xd5\x2c\xaa\x87\x69\x5b\x65\x31\x55\x67\xe6\x48\x05\x5d\xc0\xb6\x14\x85\x71\x3b\x4d\xa2\x5a\x29\xaa\xd1\xc8\x42\x25\x80\x2c\xf2\x25\xa8\xde\x03\x00\x00\xff\xff\xde\x17\x5e\xf0\x0b\x03\x00\x00")
func recover_html_tpl_bytes() ([]byte, error) {
return bindata_read(
_recover_html_tpl,
func recoverHtmlTplBytes() ([]byte, error) {
return bindataRead(
_recoverHtmlTpl,
"recover.html.tpl",
)
}
func recover_html_tpl() (*asset, error) {
bytes, err := recover_html_tpl_bytes()
func recoverHtmlTpl() (*asset, error) {
bytes, err := recoverHtmlTplBytes()
if err != nil {
return nil, err
}
info := bindata_file_info{name: "recover.html.tpl", size: 771, mode: os.FileMode(438), modTime: time.Unix(1425014937, 0)}
a := &asset{bytes: bytes, info: info}
info := bindataFileInfo{name: "recover.html.tpl", size: 779, mode: os.FileMode(438), modTime: time.Unix(1443044716, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _recover_complete_html_tpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x52\xc1\x6e\xeb\x20\x10\xbc\xe7\x2b\x10\x7a\xe7\x70\x7f\xc2\xbe\xe4\xde\x46\x6d\xee\x15\x31\xeb\x18\x15\x16\x04\xeb\x24\x95\xe5\x7f\x2f\xc4\x49\x9c\xb6\xa9\x7a\xa8\xea\x8b\x99\x65\x67\x86\x91\x46\xb6\x3e\x3a\xa6\x1a\x32\x1e\x2b\x3e\x0c\xce\xf7\x48\x41\x51\x07\x9a\xf1\x08\x8d\xdf\x43\x14\x8d\x77\xc1\x02\x01\x1f\x47\xce\x1c\x50\xe7\x75\xc5\xd7\x8f\xcf\x1b\x5e\x2f\x58\xfe\xa4\xc1\xd0\x13\xa3\xb7\x00\x15\xef\x8c\xd6\x80\x9c\xa1\x72\x19\x91\x7f\x2d\x60\xaf\x6c\x0f\x45\x7f\x79\x1a\x14\x1d\x71\x87\x1b\x54\x4a\x07\x1f\xf5\x85\x3d\xe3\x60\x55\x03\x9d\xb7\x1a\x62\xb6\xbe\x8e\x67\xdd\xcb\xea\x24\x2d\xb7\xf1\x62\x30\x0c\x07\x43\x1d\x5b\x42\x8c\x69\x1c\xcf\xe8\x5f\x46\xd6\x24\x62\xff\x2b\x66\x50\xc3\x91\x2d\xd9\xec\x56\xd6\xa2\xc2\x1d\x5c\xf7\xc6\x51\xa6\xa0\xb0\xce\x46\xf9\x28\x4e\xe7\xc9\x63\x18\x00\x75\x21\xdc\xfe\x7e\x4e\xd6\x78\x6c\x4d\x74\x2f\xdf\x24\x5c\x4d\xd7\xec\x5e\xd2\x33\x75\xfd\xfb\xc0\x5f\x1e\xf1\x07\xc1\x3f\xd6\x21\xcb\x1c\x53\x6c\x1f\x32\x28\xef\x9e\x43\x95\xe9\xe6\x73\x35\xb6\x3d\x91\xc7\xb3\x50\xea\xb7\xce\x10\xaf\x9f\xa6\x52\x4a\x31\xdd\xde\x26\x97\x8a\x75\x11\xda\x8a\x0b\xeb\x77\x06\x79\xbd\x52\xd8\x80\x95\x42\xd5\x0b\x29\x4a\xd3\xeb\xf7\x00\x00\x00\xff\xff\xba\x89\x7e\x9e\xf0\x02\x00\x00")
var _recover_completeHtmlTpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x52\xb1\x4e\xc3\x30\x10\xdd\x91\xf8\x87\x93\xc5\xdc\xec\xc8\xc9\xd2\x1d\x10\x74\x47\x6e\x7c\x69\x2c\xec\xb3\x65\x5f\xda\xa2\x28\xff\x8e\xdd\x94\x96\xaa\x20\x31\x40\x96\xf8\x9d\xef\xde\xf3\xd3\x3b\xd9\xf9\xe8\x40\xb5\x6c\x3c\xd5\x62\x1c\x9d\x1f\x88\x83\xe2\x1e\x35\x88\x88\xad\xdf\x62\xac\x5a\xef\x82\x45\x46\x31\x4d\x02\x1c\x72\xef\x75\x2d\x9e\x1e\x5f\x56\xa2\xb9\xbd\x81\xfc\x49\x43\x61\x60\xe0\xf7\x80\xb5\xe8\x8d\xd6\x48\x02\x48\xb9\x8c\xd8\xbf\x15\xb0\x55\x76\xc0\x22\xb0\x38\x14\x0a\x51\xf5\xdd\x70\x50\x29\xed\x7c\xd4\x9f\xe3\x67\x1c\xac\x6a\xb1\xf7\x56\x63\xcc\xe2\xa7\xf2\x91\xb8\xd0\xc9\x75\x3c\x91\x8e\xe3\xce\x70\x0f\x0b\x8c\x31\x4d\xd3\x11\xdd\x65\x64\x4d\x62\xb8\xaf\xc1\x90\xc6\x3d\x2c\xe0\xac\x50\xda\xa2\xa2\x0d\x9e\xfa\xa6\x49\xa6\xa0\xa8\xc9\xaf\xce\xc7\xea\x70\x9e\x45\xc6\x11\x49\x97\x81\xaf\xbf\x5f\xd8\x69\x3d\x75\x26\xba\xd7\x1f\x6c\x2d\xe7\x6b\xf8\x43\x7b\x57\x8a\xff\x61\xf3\x32\xf2\xcc\xb3\x4f\xb1\x7b\xc8\xa0\xe4\x7c\x8e\xbe\x54\x57\x57\xf1\xaf\x07\x66\x4f\x47\xa6\x34\xac\x9d\x61\xd1\x3c\xcf\xab\x27\xab\xf9\xf6\xc2\xbc\x54\xd0\x47\xec\x6a\x51\x59\xbf\x31\x24\x9a\xa5\xa2\x16\xad\xac\x54\x6e\x90\x55\xd9\xe8\xe6\x23\x00\x00\xff\xff\xf6\xef\xd0\x46\xd8\x02\x00\x00")
func recover_complete_html_tpl_bytes() ([]byte, error) {
return bindata_read(
_recover_complete_html_tpl,
func recover_completeHtmlTplBytes() ([]byte, error) {
return bindataRead(
_recover_completeHtmlTpl,
"recover_complete.html.tpl",
)
}
func recover_complete_html_tpl() (*asset, error) {
bytes, err := recover_complete_html_tpl_bytes()
func recover_completeHtmlTpl() (*asset, error) {
bytes, err := recover_completeHtmlTplBytes()
if err != nil {
return nil, err
}
info := bindata_file_info{name: "recover_complete.html.tpl", size: 752, mode: os.FileMode(438), modTime: time.Unix(1425060725, 0)}
a := &asset{bytes: bytes, info: info}
info := bindataFileInfo{name: "recover_complete.html.tpl", size: 728, mode: os.FileMode(438), modTime: time.Unix(1443044716, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _recover_email_html_tpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb2\xc9\x30\xb4\x0b\x4a\x4d\xce\x2f\x4b\x2d\x52\xa8\xcc\x2f\x2d\x52\x48\x4c\x4e\xce\x2f\xcd\x2b\xb1\xd1\x07\x4a\x70\xd9\x24\x15\x29\xe8\x03\xa9\x02\xbb\x80\x9c\xd4\xc4\xe2\x54\x85\xe4\x9c\xcc\xe4\x6c\x05\x9b\x44\x85\x8c\xa2\xd4\x34\x5b\xa5\xea\x6a\xbd\xda\x5a\x25\xa0\x92\x8c\xd4\xa2\x54\x1b\xfd\x44\x3b\x85\x92\x7c\x85\x22\xac\xc6\x15\xd8\x71\x01\x02\x00\x00\xff\xff\x9d\xc9\x73\xb1\x6c\x00\x00\x00")
var _recover_emailHtmlTpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb2\xc9\x30\xb4\x0b\x4a\x4d\xce\x2f\x4b\x2d\x52\xa8\xcc\x2f\x2d\x52\x48\x4c\x4e\xce\x2f\xcd\x2b\xb1\xd1\x07\x4a\xf0\x72\xd9\x24\x15\x29\xe8\x83\xe8\x02\xbb\x80\x9c\xd4\xc4\xe2\x54\x85\xe4\x9c\xcc\xe4\x6c\x05\x9b\x44\x85\x8c\xa2\xd4\x34\x5b\xa5\xea\x6a\xbd\xda\x5a\x25\xa0\x9a\x8c\xd4\xa2\x54\x1b\xfd\x44\x3b\x85\x92\x7c\x85\x22\xac\x06\x16\x00\xcd\x01\x04\x00\x00\xff\xff\xbd\x98\x68\x04\x6f\x00\x00\x00")
func recover_email_html_tpl_bytes() ([]byte, error) {
return bindata_read(
_recover_email_html_tpl,
func recover_emailHtmlTplBytes() ([]byte, error) {
return bindataRead(
_recover_emailHtmlTpl,
"recover_email.html.tpl",
)
}
func recover_email_html_tpl() (*asset, error) {
bytes, err := recover_email_html_tpl_bytes()
func recover_emailHtmlTpl() (*asset, error) {
bytes, err := recover_emailHtmlTplBytes()
if err != nil {
return nil, err
}
info := bindata_file_info{name: "recover_email.html.tpl", size: 108, mode: os.FileMode(438), modTime: time.Unix(1425861503, 0)}
a := &asset{bytes: bytes, info: info}
info := bindataFileInfo{name: "recover_email.html.tpl", size: 111, mode: os.FileMode(438), modTime: time.Unix(1443044716, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _recover_email_txt_tpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x24\xc8\xd1\x0d\x82\x40\x10\x04\xd0\x56\xa6\x02\x6b\xb1\x00\x7e\xce\x73\xd1\x8d\xeb\x0c\xd9\x5b\x42\x08\xa1\x77\x4d\xf8\x7c\xef\x1e\xd6\x86\xa1\x6b\xd9\xd1\xf8\xc4\xd2\x46\x19\xea\x6d\x98\x15\xa1\xcd\xf9\x42\x38\x3f\x70\x96\xb0\x6b\x4d\x3c\x52\xdb\xb0\xc4\xdf\x5d\x9c\x3d\xbf\xd7\xb7\xde\xb5\xb2\x26\x4e\x3c\x8e\xdb\x79\xfe\x02\x00\x00\xff\xff\x66\x27\xac\x6d\x5b\x00\x00\x00")
var _recover_emailTxtTpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x24\xc8\xd1\x0d\x82\x40\x10\x04\xd0\x56\xa6\x02\x6b\xb1\x00\x7e\xce\x73\xd1\x8d\xeb\x0c\xd9\x5b\x42\x08\xa1\x77\x4d\xf8\x7c\xef\x1e\xd6\x86\xa1\x6b\xd9\xd1\xf8\xc4\xd2\x46\x19\xea\x6d\x98\x15\xa1\xcd\xf9\x42\x38\x3f\x70\x96\xb0\x6b\x4d\x3c\x52\xdb\xb0\xc4\xdf\x5d\x9c\x3d\xbf\xd7\xb7\xde\xb5\xb2\x26\x4e\x3c\x8e\xdb\x79\xfe\x02\x00\x00\xff\xff\x66\x27\xac\x6d\x5b\x00\x00\x00")
func recover_email_txt_tpl_bytes() ([]byte, error) {
return bindata_read(
_recover_email_txt_tpl,
func recover_emailTxtTplBytes() ([]byte, error) {
return bindataRead(
_recover_emailTxtTpl,
"recover_email.txt.tpl",
)
}
func recover_email_txt_tpl() (*asset, error) {
bytes, err := recover_email_txt_tpl_bytes()
func recover_emailTxtTpl() (*asset, error) {
bytes, err := recover_emailTxtTplBytes()
if err != nil {
return nil, err
}
info := bindata_file_info{name: "recover_email.txt.tpl", size: 91, mode: os.FileMode(438), modTime: time.Unix(1425861617, 0)}
a := &asset{bytes: bytes, info: info}
info := bindataFileInfo{name: "recover_email.txt.tpl", size: 91, mode: os.FileMode(438), modTime: time.Unix(1443044716, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _register_html_tpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x94\x53\x4d\x6f\xe2\x30\x10\x3d\x93\x5f\x31\xb2\x38\x93\x3b\x72\x72\xd9\xbd\xec\x65\x85\x56\xab\x5e\x2b\x13\x4f\x88\x55\x7f\xc9\x76\x0a\x28\xca\x7f\xaf\x9d\x40\x42\x40\x6d\xe9\xc5\xf6\x8c\xde\x9b\x79\x6f\x34\xa6\xb5\x71\x0a\x58\x15\x84\xd1\x05\xe9\x3a\x65\x5a\x1d\x2c\x0b\x0d\x72\x20\x0e\x0f\xc2\x07\x74\xa4\xef\x09\x28\x0c\x8d\xe1\x05\xb1\xc6\x07\x52\x66\x2b\x2a\xd9\x1e\x25\x44\x7e\xe2\x6d\xac\x13\x8a\xb9\xf3\x9f\xdf\x11\x5b\x76\x5d\x10\x41\x22\xdc\x66\xb7\x34\x1f\x18\x89\x2a\xb4\x6d\x03\x68\xa6\xf0\x81\x0b\xe1\x6c\x63\x36\xe0\x29\x10\x78\x67\xb2\x1d\x20\x47\x11\x9a\x9b\x6a\x2f\x29\xdf\xf7\x91\x9a\x0e\xd4\x3c\x11\xad\x64\x15\x36\x46\x72\x1c\x14\x3d\x2a\x20\x90\x97\x74\xef\xe2\x99\xad\xba\x6e\x6d\x05\x87\x6d\xb1\x40\x5c\x1b\xa1\x73\x7e\x8a\xd6\x31\x92\x71\x0e\x09\x2c\x34\xc7\x13\x6c\x20\x91\x13\xc0\x31\x7d\xc0\x09\xd1\xf7\xd4\x5b\xa6\xcb\x41\x17\xcd\x87\xf7\xd8\xf0\x22\x72\x79\x2d\x67\x68\x99\xf7\x47\xe3\x38\x29\x77\x97\xd7\x67\x13\x9b\x90\x97\x59\xcd\xf1\x62\x04\xbb\x29\x7d\x6b\x7b\x69\x70\xd4\xbf\xb9\x56\x78\xd6\xc0\x52\x79\x65\x74\x2d\x9c\x7a\x9d\x1d\xfc\x1a\x33\xf0\x9d\x93\x07\xe6\xd7\x8e\xee\xcb\x3e\xe1\xec\xbe\xc3\x0f\x1c\x8e\x42\x47\x41\xbe\xdd\x2b\x31\x2f\xe4\xbf\xeb\xc7\x98\xda\x53\x06\x8d\xc3\xba\x20\x79\x74\xcf\x74\x85\x92\xe6\xac\xcc\xee\xca\x34\x82\x73\xd4\x64\xde\xfc\x93\x77\xf5\xdf\x18\xa4\xe5\x9c\x96\x7d\xc8\xfe\x37\x6f\xa8\xc7\x9d\xcd\x68\x9e\x7e\x69\xf9\x11\x00\x00\xff\xff\x0e\xa6\x2d\x81\xac\x03\x00\x00")
var _registerHtmlTpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x94\x53\xb1\x6e\x83\x30\x10\x9d\x1b\x29\xff\x70\xb2\x32\x87\x3d\x32\x2c\xed\xd2\xa5\x8a\xaa\xaa\x6b\xe5\xe0\x23\x58\x35\xb6\x65\x9b\x26\x11\xe2\xdf\x6b\x43\x02\x81\xa8\x6d\xba\x18\xdf\xf1\xde\xf9\xbd\xd3\x1d\x2d\xb4\xad\x80\xe5\x5e\x68\x95\x92\xa6\xa9\x74\xad\xbc\x61\xbe\x44\x0e\xc4\xe2\x5e\x38\x8f\x96\xb4\x2d\x81\x0a\x7d\xa9\x79\x4a\x8c\x76\x9e\x64\xcb\xc5\x03\x95\x6c\x87\x12\x42\x81\x48\x5c\x1b\x2b\x2a\x66\x4f\xcf\x4f\x01\x9c\x35\x8d\x17\x5e\x22\x5c\x67\x37\x34\xe9\x18\x1d\x57\x28\x53\x7b\x50\xac\xc2\x1b\x32\xf8\x93\x09\x59\x8f\x47\x4f\xe0\x8b\xc9\xba\x83\x1c\x84\x2f\xaf\xca\xbd\xc7\x7c\xdb\x06\x6a\x3c\x50\xf1\x48\x34\x92\xe5\x58\x6a\xc9\xb1\x93\x74\x2b\x81\x40\x92\xd1\x9d\x0d\x67\xd0\xd0\x34\x2b\x23\x38\x6c\xd2\x09\xe4\xf2\x12\x5a\xeb\x86\x68\x15\x22\x19\x5a\x11\xc1\x42\x71\x3c\xc2\x1a\x22\x39\x02\x2c\x53\x7b\x1c\x10\x6d\x4b\x9d\x61\x2a\xeb\x84\xd1\xa4\xbb\xf7\x2f\x9e\x55\x4e\x3f\xb3\x36\x1a\xe6\xdc\x41\x5b\x4e\xb2\xed\xf9\xf6\x63\xd3\x06\xe8\xb9\x5d\x63\x3c\xe9\xc2\x76\x48\x4f\x9c\x4f\x3d\xf6\x16\xd6\x97\x12\xf7\x7a\x98\x89\xcf\xb5\x2a\x84\xad\x3e\x46\x13\x8f\x7d\x06\xfe\x34\x73\x43\xfd\xdd\xd4\xbc\xee\x3d\xe6\xe6\x4f\xfc\xc7\x64\x2f\xb5\x97\xe4\xea\x5d\x25\xc6\xc1\x7c\xbd\xac\xc8\x28\x80\x32\x28\x2d\x16\x29\x49\x42\x07\x98\xca\x51\xd2\x84\x85\x1f\xf3\x4a\xa5\xe0\x1c\x15\x19\x97\xe0\xe8\x6c\xf1\x12\x82\x38\xa7\xc3\xdc\x77\xd9\x37\xfd\x89\xaa\x1f\xdf\xe5\x82\x26\x71\x67\xb3\xef\x00\x00\x00\xff\xff\x21\x82\x69\xb5\xba\x03\x00\x00")
func register_html_tpl_bytes() ([]byte, error) {
return bindata_read(
_register_html_tpl,
func registerHtmlTplBytes() ([]byte, error) {
return bindataRead(
_registerHtmlTpl,
"register.html.tpl",
)
}
func register_html_tpl() (*asset, error) {
bytes, err := register_html_tpl_bytes()
func registerHtmlTpl() (*asset, error) {
bytes, err := registerHtmlTplBytes()
if err != nil {
return nil, err
}
info := bindata_file_info{name: "register.html.tpl", size: 940, mode: os.FileMode(438), modTime: time.Unix(1424982621, 0)}
a := &asset{bytes: bytes, info: info}
info := bindataFileInfo{name: "register.html.tpl", size: 954, mode: os.FileMode(438), modTime: time.Unix(1446067138, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -236,6 +250,17 @@ func Asset(name string) ([]byte, error) {
return nil, fmt.Errorf("Asset %s not found", name)
}
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
}
// AssetInfo loads and returns the asset info for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
@ -262,14 +287,14 @@ func AssetNames() []string {
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"confirm_email.html.tpl": confirm_email_html_tpl,
"confirm_email.txt.tpl": confirm_email_txt_tpl,
"login.html.tpl": login_html_tpl,
"recover.html.tpl": recover_html_tpl,
"recover_complete.html.tpl": recover_complete_html_tpl,
"recover_email.html.tpl": recover_email_html_tpl,
"recover_email.txt.tpl": recover_email_txt_tpl,
"register.html.tpl": register_html_tpl,
"confirm_email.html.tpl": confirm_emailHtmlTpl,
"confirm_email.txt.tpl": confirm_emailTxtTpl,
"login.html.tpl": loginHtmlTpl,
"recover.html.tpl": recoverHtmlTpl,
"recover_complete.html.tpl": recover_completeHtmlTpl,
"recover_email.html.tpl": recover_emailHtmlTpl,
"recover_email.txt.tpl": recover_emailTxtTpl,
"register.html.tpl": registerHtmlTpl,
}
// AssetDir returns the file names below a certain
@ -301,78 +326,71 @@ func AssetDir(name string) ([]string, error) {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for name := range node.Children {
rv = append(rv, name)
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}
type _bintree_t struct {
Func func() (*asset, error)
Children map[string]*_bintree_t
type bintree struct {
Func func() (*asset, error)
Children map[string]*bintree
}
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
"confirm_email.html.tpl": &_bintree_t{confirm_email_html_tpl, map[string]*_bintree_t{
}},
"confirm_email.txt.tpl": &_bintree_t{confirm_email_txt_tpl, map[string]*_bintree_t{
}},
"login.html.tpl": &_bintree_t{login_html_tpl, map[string]*_bintree_t{
}},
"recover.html.tpl": &_bintree_t{recover_html_tpl, map[string]*_bintree_t{
}},
"recover_complete.html.tpl": &_bintree_t{recover_complete_html_tpl, map[string]*_bintree_t{
}},
"recover_email.html.tpl": &_bintree_t{recover_email_html_tpl, map[string]*_bintree_t{
}},
"recover_email.txt.tpl": &_bintree_t{recover_email_txt_tpl, map[string]*_bintree_t{
}},
"register.html.tpl": &_bintree_t{register_html_tpl, map[string]*_bintree_t{
}},
var _bintree = &bintree{nil, map[string]*bintree{
"confirm_email.html.tpl": &bintree{confirm_emailHtmlTpl, map[string]*bintree{}},
"confirm_email.txt.tpl": &bintree{confirm_emailTxtTpl, map[string]*bintree{}},
"login.html.tpl": &bintree{loginHtmlTpl, map[string]*bintree{}},
"recover.html.tpl": &bintree{recoverHtmlTpl, map[string]*bintree{}},
"recover_complete.html.tpl": &bintree{recover_completeHtmlTpl, map[string]*bintree{}},
"recover_email.html.tpl": &bintree{recover_emailHtmlTpl, map[string]*bintree{}},
"recover_email.txt.tpl": &bintree{recover_emailTxtTpl, map[string]*bintree{}},
"register.html.tpl": &bintree{registerHtmlTpl, map[string]*bintree{}},
}}
// Restore an asset under the given directory
// RestoreAsset restores an asset under the given directory
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, path.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
if err != nil {
return err
}
return nil
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
if err != nil {
return err
}
return nil
}
// Restore assets under the given directory recursively
// RestoreAssets restores an asset under the given directory recursively
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
if err != nil { // File
return RestoreAsset(dir, name)
} else { // Dir
for _, child := range children {
err = RestoreAssets(dir, path.Join(name, child))
if err != nil {
return err
}
}
}
return nil
children, err := AssetDir(name)
// File
if err != nil {
return RestoreAsset(dir, name)
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
}
}
return nil
}
func _filePath(dir, name string) string {
cannonicalName := strings.Replace(name, "\\", "/", -1)
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
cannonicalName := strings.Replace(name, "\\", "/", -1)
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
}

View File

@ -70,9 +70,12 @@ func (r *Register) Storage() authboss.StorageOptions {
func (reg *Register) registerHandler(ctx *authboss.Context, w http.ResponseWriter, r *http.Request) error {
switch r.Method {
case "GET":
primaryID := r.FormValue("primaryID")
data := authboss.HTMLData{
"primaryID": reg.PrimaryID,
"primaryIDValue": "",
"primaryID": reg.PrimaryID,
"primaryIDValue": primaryID,
"primaryIDReadonly": len(primaryID) > 0,
}
return reg.templates.Render(ctx, w, r, tplRegister, data)
case "POST":