authentication

package
v0.0.0-...-4688182 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Rendered for windows/amd64

Overview

package authentication implements win32 authentication functions that don't seem to exist in other libraries see https://msdn.microsoft.com/en-us/library/windows/desktop/aa374731(v=vs.85).aspx

Index

Constants

View Source
const (
	LogonInteractive = 2

	LogonProviderDefault = 0
)

https://msdn.microsoft.com/en-gb/library/windows/desktop/aa378184(v=vs.85).aspx

Variables

This section is empty.

Functions

func LogonUser

func LogonUser(username, domain, password string, logonType, logonProvider uint32) (syscall.Token, error)

LogonUser - https://msdn.microsoft.com/en-gb/library/windows/desktop/aa378184(v=vs.85).aspx

Types

type LSA_UNICODE_STRING

type LSA_UNICODE_STRING struct {
	Length        uint16
	MaximumLength uint16
	Buffer        uintptr
}

func (*LSA_UNICODE_STRING) String

func (us *LSA_UNICODE_STRING) String() string

type LUID

type LUID struct {
	LowPart  uint32
	HighPart int32
}

type PLUID

type PLUID *LUID

type SecurityLogonSessionData

type SecurityLogonSessionData struct {
	Size                  uint32
	LogonId               LUID
	UserName              string
	LogonDomain           string
	AuthenticationPackage string
	LogonType             SecurityLogonType
	Session               uint32
	Sid                   uintptr
	LogonTime             uint64
	LogonServer           string
	DnsDomainName         string
	Upn                   string
}

func GetLogonSessions

func GetLogonSessions() ([]SecurityLogonSessionData, error)

GetLogonSessions combines the following win32 functions: LsaEnumerateLogonSessions - https://msdn.microsoft.com/en-us/library/windows/desktop/aa378275(v=vs.85).aspx LsaGetLogonSessionData - https://msdn.microsoft.com/en-us/library/windows/desktop/aa378290(v=vs.85).aspx

func GetUserLogonSessions

func GetUserLogonSessions(username string) ([]SecurityLogonSessionData, error)

type SecurityLogonType

type SecurityLogonType uint32
const (
	SLTInteractive SecurityLogonType = iota + 2
	SLTNetwork
	SLTBatch
	SLTService
	SLTProxy
	SLTUnlock
	SLTNetworkCleartext
	SLTNewCredentials
	SLTRemoteInteractive
	SLTCachedInteractive
	SLTCachedRemoteInteractive
	SLTCachedUnlock
)

Jump to

Keyboard shortcuts

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