token_admission

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateHMACRequest

func ValidateHMACRequest(req *http.Request, bodyBytes []byte) bool

ValidateHMACRequest conforms to the OME specification: https://airensoft.gitbook.io/ovenmediaengine/access-control/admission-webhooks#security

Types

type OMEAdmissionBody

type OMEAdmissionBody struct {
	Client  OMEClient
	Request OMEAdmissionRequest
}

type OMEAdmissionRequest

type OMEAdmissionRequest struct {
	Direction string
	Protocol  string
	URL       string
	Time      time.Time
}

type OMEAdmissionResponse

type OMEAdmissionResponse struct {
	Allowed  bool   `json:"allowed"`
	NewURL   string `json:"new_url"`
	Lifetime int    `json:"lifetime"`
	Reason   string `json:"reason"`
}

type OMEClient

type OMEClient struct {
	Address string
	Port    int
}

type StreamInfo

type StreamInfo struct {
	Title           string
	StreamName      string
	ApplicationName string
	CreationDate    time.Time
	OwnerName       string
	OwnerID         string
	Public          bool
}

type StreamRequest

type StreamRequest struct {
	StreamOptions StreamInfo
	Expires       int
	CreateTokens  bool
}

type StreamResponse

type StreamResponse struct {
	Success     bool
	StreamToken string
	WatchToken  string
}

type TokenInfo

type TokenInfo struct {
	Direction   string
	Stream      string
	Application string
}

type TokenRequest

type TokenRequest struct {
	TokenOptions string
	Expires      int
}

type TokenResponse

type TokenResponse struct {
	Success bool
	Token   string
}

Jump to

Keyboard shortcuts

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