intra

package
v0.0.0-...-382e2d2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPDiscourseSSO

func HTTPDiscourseSSO(w http.ResponseWriter, r *http.Request)

func HTTPOauthCallback

func HTTPOauthCallback(w http.ResponseWriter, r *http.Request)

Types

type IntraUser

type IntraUser struct {
	ID          int    `json:"id"`
	Email       string `json:"email"`
	Login       string `json:"login"`
	DisplayName string `json:"displayname"`
	ImageURL    string `json:"image_url"`
	IsStaff     bool   `json:"staff?"`
	// Which computer you're on right now
	//Location    string `json:"location"`
	CursusUsers []struct {
		Cursus struct {
			ID int `json:"id"`
		} `json:"cursus"`
	} `json:"cursus_users"`
	Campus []struct {
		ID int `json:"id"`
	}
}

type SSOHelper

type SSOHelper struct {
	PayloadB64 string
	Payload    url.Values
	Nonce      string
	ReturnURL  string
}

func SSORequest

func SSORequest(r *http.Request) (*SSOHelper, error)

func (*SSOHelper) IsValid

func (h *SSOHelper) IsValid(payload, sig []byte) bool

Jump to

Keyboard shortcuts

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