Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoToken = errors.New("no token") ErrNoCookies = errors.New("no cookies") )
Functions ¶
This section is empty.
Types ¶
type BrowserAuth ¶
type BrowserAuth struct {
// contains filtered or unexported fields
}
func NewBrowserAuth ¶
func NewBrowserAuth() (BrowserAuth, error)
func (BrowserAuth) SlackToken ¶
func (c BrowserAuth) SlackToken() string
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
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 // 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 (ValueAuth) SlackToken ¶
func (c ValueAuth) SlackToken() string
Click to show internal directories.
Click to hide internal directories.