Skip to content

typetalk-gadget/go-typetalk-token-source

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-typetalk-token-source

Implementation of oauth2.TokenSource in Typetalk.

Requires

Go 1.14+

Usage

import "github.com/typetalk-gadget/go-typetalk-token-source/source"

Example

package main

import (
	"fmt"
	"os"

	"github.com/typetalk-gadget/go-typetalk-token-source/source"
)

func main() {
	ts := source.TokenSource{
		ClientID:     os.Getenv("TYPETALK_CLIENT_ID"),
		ClientSecret: os.Getenv("TYPETALK_CLIENT_SECRET"),
		Scope:        "my topic.read",
	}
	t, err := ts.Token()
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Printf("token: %#v\n", t)
}

Bugs and Feedback

For bugs, questions and discussions please use the Github Issues.

License

MIT License

Author

vvatanabe

About

Implementation of oauth2.TokenSource in Typetalk. #Unofficial

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages