loginshare

package module
v0.0.0-...-403df12 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MIT Imports: 4 Imported by: 0

README

go-loginshare

Go implmentation of the Kayako LoginShare API

Documentation

Overview

Package loginshare provides methods for interacting with Kayako's Loginshare authentication system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginShare

type LoginShare struct {
	AllowedInterfaces []string
	OnNewAuth         func(r RequestParams) (Response, error)
}

func (*LoginShare) Request

func (l *LoginShare) Request(w http.ResponseWriter, r *http.Request)

Request implements the http.Handler interface to provide a drop-in Loginshare request/response handler

type RequestParams

type RequestParams struct {
	Username  string
	Password  string
	IPAddress string
	Interface string
}

type Response

type Response struct {
	XMLName     struct{} `xml:"loginshare"`
	Result      int      `xml:"result"`
	Message     string   `xml:"message,omitempty"`
	StaffRecord Staff    `xml:"staff,omitempty"`
}

Response to a loginshare authentication request

type Staff

type Staff struct {
	Firstname string `xml:"firstname"`
	Lastname  string `xml:"lastname"`
	Title     string `xml:"designation"`
	Email     string `xml:"email"`
	Cell      string `xml:"mobilenumber"`
	Signature string `xml:"signature"`
	Team      string `xml:"team"`
}

Staff record component of a loginshare response

Jump to

Keyboard shortcuts

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