Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultExpiresInSecond = 3600 // 1 hour (60s * 60m) DefaultExpiresIn = ExpiresIn(DefaultExpiresInSecond) )
View Source
const AuthTokenKey = "auth-token"
View Source
const SessionTokenKey = "session-token"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InvitationCode ¶
type InvitationCode string
func GenerateInvitationCode ¶
func GenerateInvitationCode() InvitationCode
func NewInvitationCode ¶
func NewInvitationCode(value string) (InvitationCode, error)
func (InvitationCode) String ¶
func (ic InvitationCode) String() string
type SessionID ¶
func NewSessionID ¶
NewSessionID SessionIDを作成するファクトリー関数.
type SessionToken ¶
type SessionToken string
func GenerateSessionToken ¶
func GenerateSessionToken( sessionID SessionID, secret Secret, ) SessionToken
func ParseSessionToken ¶
func ParseSessionToken( token string, secret Secret, ) (SessionToken, error)
func (SessionToken) ID ¶
func (st SessionToken) ID(secret Secret) SessionID
func (SessionToken) String ¶
func (st SessionToken) String() string
func (SessionToken) ToSecret ¶
func (st SessionToken) ToSecret(secret Secret) Secret
Click to show internal directories.
Click to hide internal directories.