auth

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package auth is a lightweight wrapper over the "auth" methods in Slack's Web API: https://api.slack.com/methods?filter=auth.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Vars sdkservices.Vars
}

func (API) Test

func (a API) Test(ctx context.Context, args []sdktypes.Value, kwargs map[string]sdktypes.Value) (sdktypes.Value, error)

Test checks the caller's authentication & identity. Based on: https://api.slack.com/methods/auth.test. Required Slack app scopes: none.

type TestResponse

type TestResponse struct {
	api.SlackResponse

	URL                 string `json:"url,omitempty"`
	Team                string `json:"team,omitempty"`
	User                string `json:"user,omitempty"`
	TeamID              string `json:"team_id,omitempty"`
	UserID              string `json:"user_id,omitempty"`
	BotID               string `json:"bot_id,omitempty"`
	EnterpriseID        string `json:"enterprise_id,omitempty"`
	IsEnterpriseInstall bool   `json:"is_enterprise_install,omitempty"`
}

https://api.slack.com/methods/auth.test#examples

func TestWithToken

func TestWithToken(ctx context.Context, oauthToken string) (*TestResponse, error)

TestWithToken is only used internally, when it's used by the OAuth redirect handler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL