Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoToken = errors.New("no token") ErrNoCookies = errors.New("no cookies") )
Functions ¶
func IsClientToken ¶ added in v2.2.3
Types ¶
type BrowserAuth ¶
type BrowserAuth struct {
// contains filtered or unexported fields
}
func NewBrowserAuth ¶
func NewBrowserAuth(ctx context.Context, opts ...BrowserOption) (BrowserAuth, error)
func (BrowserAuth) SlackToken ¶
func (c BrowserAuth) SlackToken() string
func (BrowserAuth) Type ¶ added in v2.0.3
func (BrowserAuth) Type() Type
type BrowserAuthUI ¶ added in v2.0.3
type BrowserOption ¶ added in v2.0.3
type BrowserOption func(*BrowserAuth)
func BrowserWithAuthFlow ¶ added in v2.0.3
func BrowserWithAuthFlow(flow BrowserAuthUI) BrowserOption
func BrowserWithWorkspace ¶ added in v2.0.3
func BrowserWithWorkspace(name string) BrowserOption
type CookieFileAuth ¶
type CookieFileAuth struct {
// contains filtered or unexported fields
}
func NewCookieFileAuth ¶
func NewCookieFileAuth(token string, cookieFile string) (CookieFileAuth, error)
NewCookieFileAuth creates new auth provider from token and Mozilla cookie file.
func (CookieFileAuth) SlackToken ¶
func (c CookieFileAuth) SlackToken() string
func (CookieFileAuth) Type ¶ added in v2.0.3
func (CookieFileAuth) Type() Type
type Provider ¶
type Provider interface { // SlackToken should return the Slack Token value. SlackToken() string // Cookies should returns a set of Slack Session cookies. Cookies() []http.Cookie // Type returns the auth type. Type() Type // Validate should return error, in case the token or cookies cannot be // retrieved. Validate() error }
Provider is the Slack Authentication provider.
type ValueAuth ¶
type ValueAuth struct {
// contains filtered or unexported fields
}
ValueAuth stores Slack credentials.
func Load ¶ added in v2.1.0
Load deserialises JSON data from reader and returns a ValueAuth, that can be used to authenticate Slackdump. It will return ErrNoToken or ErrNoCookie if the authentication information is missing.
func (ValueAuth) SlackToken ¶
func (c ValueAuth) SlackToken() string
Click to show internal directories.
Click to hide internal directories.