OAuth2 provider implementation for DigitalOcean.
// Source: https://github.com/oauth2-proxy/oauth2-proxy | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
package providers
import (
"context"
"errors"
"net/url"
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/sessions"
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/requests"
)
// DigitalOceanProvider represents a DigitalOcean based Identity Provider
type DigitalOceanProvider struct {
*ProviderData
}
var _ Provider = (*DigitalOceanProvider)(nil)
const (
digitalOceanProviderName = "DigitalOcean"
digitalOceanDefaultScope = "read"
)
var (
// Default Login URL for DigitalOcean.
// Pre-parsed URL of https://cloud.digitalocean.com/v1/oauth/authorize.
digitalOceanDefaultLoginURL = &url.URL{
Scheme: "https",
Host: "cloud.digitalocean.com",
Pat
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key