azure-auth

module
v0.0.0-...-8d41f68 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0

README

azure-auth - tools for interacting with Azure and Microsoft Office365 system.

go.dev reference

The primary impetus here was to support email-oriented operations. Azure uses a version of XOAUTH2-based authentication, but its currently-distributed Go libraries do not support things like refresh tokens.

Two CLI tools exist here:

  • azure-token: retrieves and caches an access token for use with subsequent operations, such as IMAP and SMTP calls.
  • send-azure: a sendmail drop-in which uses XOAUTH2 for authentication.

Additionally, some useful library packages are available to support these and other operations:

  • token: deals with token fetching, required human interation, and caching
  • smtp: XOAUTH2 generator and SMTP client
  • config: configuration file reader for key and endpoint data

Configuration file

Most of these tools expect a configuration file to exist at ${XDG_CONFIG_PATH}/azure/config.yaml. It generally looks like:

username: me@mydomain.com
tenantID: d6e2c434-8a03-4eb7-87b5-d96dc44a651c
clientID: 44ad7be1-4a36-42bf-8fdd-6ba2e2b53890
clientSecret:  blah-BLAH-bl@h.blah~blah
scopes:
  - https://outlook.office.com/SMTP.Send
  - https://outlook.office.com/IMAP.AccessAsUser.All
  - offline_access
redirect:
  host: localhost
  port: 5050
  path: "getToken"

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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