xsrf

package
v0.0.0-...-800783e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2016 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Copyright 2016 Wenhui Shen <www.webx.top>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 Wenhui Shen <www.webx.top>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 Wenhui Shen <www.webx.top>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CookieStorage

type CookieStorage struct {
}

func (*CookieStorage) Get

func (c *CookieStorage) Get(key string, ctx echo.Context) string

func (*CookieStorage) Set

func (c *CookieStorage) Set(key, val string, ctx echo.Context)

func (*CookieStorage) Valid

func (c *CookieStorage) Valid(key, val string, ctx echo.Context) bool

type Manager

type Manager interface {
	Get(key string, ctx echo.Context) string
	Set(key, val string, ctx echo.Context)
	Valid(key, val string, ctx echo.Context) bool
}

type SecCookieStorage

type SecCookieStorage struct {
}

func (*SecCookieStorage) Get

func (c *SecCookieStorage) Get(key string, ctx echo.Context) string

func (*SecCookieStorage) Set

func (c *SecCookieStorage) Set(key, val string, ctx echo.Context)

func (*SecCookieStorage) Valid

func (c *SecCookieStorage) Valid(key, val string, ctx echo.Context) bool

type SessionStorage

type SessionStorage struct {
}

func (*SessionStorage) Get

func (c *SessionStorage) Get(key string, ctx echo.Context) string

func (*SessionStorage) Set

func (c *SessionStorage) Set(key, val string, ctx echo.Context)

func (*SessionStorage) Valid

func (c *SessionStorage) Valid(key, val string, ctx echo.Context) bool

type Xsrf

type Xsrf struct {
	Manager
	FieldName string
	On        bool
}

func New

func New(args ...Manager) *Xsrf

func (*Xsrf) Form

func (c *Xsrf) Form(ctx echo.Context) template.HTML

func (*Xsrf) Ignore

func (c *Xsrf) Ignore(on bool, ctx echo.Context)

func (*Xsrf) Middleware

func (c *Xsrf) Middleware() echo.MiddlewareFunc

func (*Xsrf) Register

func (c *Xsrf) Register(ctx echo.Context)

func (*Xsrf) Value

func (c *Xsrf) Value(ctx echo.Context) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL