Documentation
¶
Overview ¶
Package keyring은 operating system credential store를 사용하는 desktop 및 CLI session store를 제공합니다.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
SessionStore는 하나의 완전한 native application session을 OS credential store에 저장합니다. plaintext disk fallback은 없습니다.
func NewSessionStore ¶
func NewSessionStore(service string) (*SessionStore, error)
NewSessionStore는 하나의 application을 위한 기본 keyring store를 만듭니다. service는 bundle ID 같은 안정적인 application identifier여야 합니다.
func (*SessionStore) ClearSession ¶
func (store *SessionStore) ClearSession(_ context.Context) error
ClearSession은 native session을 제거합니다. credential이 없는 상태는 이미 signed-out이므로 성공으로 처리합니다.
func (*SessionStore) LoadSession ¶
func (store *SessionStore) LoadSession(_ context.Context) (*chik.ChikAuthSession, error)
LoadSession은 session이 없거나 손상된 record를 제거했을 때 nil을 반환합니다. plaintext file로 fallback하지 않습니다.
func (*SessionStore) SaveSession ¶
func (store *SessionStore) SaveSession(_ context.Context, session *chik.ChikAuthSession) error
SaveSession은 complete opaque session record를 credential-store key 경계에서 교체합니다.