token.go 367 B

1234567891011121314151617
  1. // Copyright 2017 Frédéric Guillot. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. package model
  5. import "fmt"
  6. // Token represents a CSRF token in the system.
  7. type Token struct {
  8. ID string
  9. Value string
  10. }
  11. func (t Token) String() string {
  12. return fmt.Sprintf(`ID="%s"`, t.ID)
  13. }