modulepackage
0.0.0-20250226092609-2a5485562bef
Repository: https://github.com/orisano/go-adal.git
Documentation: pkg.go.dev
# README
go-ADAL
unofficial Active Directory Authentication Library for go.
Installation
go get github.com/orisano/go-adal
How to Use
package main
import (
"context"
"io"
"log"
"os"
"github.com/orisano/go-adal"
)
const (
tenant = "common"
resource = "resource.example"
clientID = "xxxxxxxxxxxxxxxxx"
clientSecret = "xxxxxxxxxxxxxxxxx"
)
func main() {
ac, err := adal.NewAuthenticationContext(tenant)
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
client, err := ac.Client(ctx, resource, clientID, clientSecret)
if err != nil {
log.Fatal(err)
}
resp, err := client.Get("http://api.example/v1/resource")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
io.Copy(os.Stdout, resp.Body)
}
Author
Nao Yonashiro (@orisano)
License
MIT
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author