Documentation ¶
Index ¶
- Constants
- func GenerateToken(id string, sign string) (string, error)
- func GetID(token string, sign string) (string, error)
- func GetUIDCtx(ctx context.Context) string
- func SetUIDCtx(ctx context.Context, uid string) context.Context
- func ValidToken(token string, sign string) error
- type Article
- type Auth
- type Code
- type CodeID
- type EMail
- type ExpiresIn
- type IDToken
- type Password
- type RefreshToken
- type Session
- type SessionID
- type SessionToken
- type Signature
- type User
- type UserID
Constants ¶
View Source
const ( IDTokenKey = "id-token" SessionTokenKey = "session-token" IDKey = "id" SignKey = "secret" DefaultExpires = 86400 // 1 day )
View Source
const Age = 2592000 * time.Second // 30 days
Variables ¶
This section is empty.
Functions ¶
func ValidToken ¶
Types ¶
type Auth ¶
type RefreshToken ¶
type RefreshToken string // FirebaseTokenとかの命名の方がよいかも
type SessionToken ¶
type SessionToken string
Click to show internal directories.
Click to hide internal directories.