endpoints

package
v0.0.0-...-2a41e2e Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package endpoints defines a wrapper around the various endpoints returned by an eduVPN server in well-known

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoints

type Endpoints struct {
	// API defines the API endpoints, split by version
	API Versions `json:"api"`
	// V is the version string for the server
	V string `json:"v"`
}

Endpoints defines the json format for /.well-known/vpn-user-portal".

func (Endpoints) Validate

func (e Endpoints) Validate() error

Validate validates the endpoints by parsing them and checking the scheme is HTTP An error is returned if they are not valid

type List

type List struct {
	// API is the API endpoint which we use for calls such as /info, /connect, ...
	API string `json:"api_endpoint"`
	// Authorization is the authorization endpoint for OAuth
	Authorization string `json:"authorization_endpoint"`
	// Token is the token endpoint for OAuth
	Token string `json:"token_endpoint"`
}

List is the list of endpoints as returned by the eduVPN server

type Versions

type Versions struct {
	// V2 is the legacy V2 API, this is not used
	V2 List `json:"http://eduvpn.org/api#2"`
	// V3 is the newest API, which we use
	V3 List `json:"http://eduvpn.org/api#3"`
}

Versions is the endpoints separated by API version

Jump to

Keyboard shortcuts

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