network

package
v0.0.0-...-243feeb Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	// Certs is the list of CA certificates that are used
	Certs cert.Certs
	// SSID is the name of the network
	SSID string
	// MinRSN is the minimum RSN proto
	MinRSN string
	// ServerIDs is the list of server names
	ServerIDs []string
	// ProviderInfo is the ProviderInfo info
	ProviderInfo ProviderInfo
	// AnonIdentity is the anonymous identity found in the EAP config, OuterIdentity in clientcredentials
	// This is optional as when it's not set it will be set to the username in case of non TLS
	AnonIdentity string
}

Base is the definition that each network always has

type Credentials

type Credentials struct {
	// Username is the string that is configured as the identity for the connection
	// This is gotten from the user
	// This username is prefixed with the InnerIdentityPrefix
	// It is suffixed with the InnerIdentitySuffix
	Username string
	// Prefix is the prefix for the username
	Prefix string
	// Suffix is the suffix for the username
	Suffix string
	// Password is the string that is configured as the RADIUS password for the connection
	Password string
}

Credentials is the credentials belonging to the Non TLS network

type Help

type Help struct {
	// Email is the e-mail address as a string
	Email string
	// Phone is the phone number as a string
	Phone string
	// Web is the web URL as a string
	Web string
}

Help is the struct that contains information on how to contact an organization

type Network

type Network interface {
	// Method returns the EAP method
	Method() method.Type
	// ProviderInfo returns the EAP ProviderInfo
	ProviderInfo() ProviderInfo
}

A network belongs to the network interface when it has a method

type NonTLS

type NonTLS struct {
	Base
	// Credentials are the credentials belonging to the Non TLS network
	Credentials Credentials
	// MethodType is the method
	MethodType method.Type
	// InnerAuth is the inner authentication method
	InnerAuth inner.Type
}

NonTLS is a structure for creating a network that has EAP method not TLS

func (*NonTLS) Method

func (n *NonTLS) Method() method.Type

func (*NonTLS) ProviderInfo

func (n *NonTLS) ProviderInfo() ProviderInfo

type ProviderInfo

type ProviderInfo struct {
	// Helpdesk contains the help information on how to contact the organization that owns the network
	Helpdesk Help
	// Name is the display name of the network as provided by the organization which should be represented in the UI
	Name string
	// Description is the description of the network as provided by the organization
	Description string
	Logo string
	// Terms is the terms of use for this network
	Terms string
}

ProviderInfo is the ProviderInfo element for the network

type TLS

type TLS struct {
	Base
	// ClientCertificate is the client certificate that is protected by a password in a PKCS12 container
	ClientCert *cert.ClientCert

	// RawPKCS12 is the raw PKCS12 container
	RawPKCS12 string

	// Password is the password that encrypts the ClientCertificate
	Password string
}

TLS is a structure for creating a network that has EAP method TLS

func (*TLS) Method

func (t *TLS) Method() method.Type

func (*TLS) ProviderInfo

func (t *TLS) ProviderInfo() ProviderInfo

func (*TLS) Validity

func (t *TLS) Validity() time.Time

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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