Versions in this module Expand all Collapse all v1 v1.0.2 Jan 4, 2021 v1.0.1 Jan 4, 2021 Changes in this version + const ASC_REQ_ALLOCATE_MEMORY — windows/amd64 + const ASC_REQ_CONFIDENTIALITY — windows/amd64 + const ASC_REQ_CONNECTION — windows/amd64 + const ASC_REQ_DATAGRAM — windows/amd64 + const ASC_REQ_DELEGATE — windows/amd64 + const ASC_REQ_EXTENDED_ERROR — windows/amd64 + const ASC_REQ_INTEGRITY — windows/amd64 + const ASC_REQ_MUTUAL_AUTH — windows/amd64 + const ASC_REQ_REPLAY_DETECT — windows/amd64 + const ASC_REQ_SEQUENCE_DETECT — windows/amd64 + const ASC_REQ_STREAM — windows/amd64 + const ASC_REQ_USE_DCE_STYLE — windows/amd64 + const ASC_REQ_USE_SESSION_KEY — windows/amd64 + const ERROR_ACCESS_DENIED — windows/amd64 + const ERROR_BAD_NETPATH — windows/amd64 + const ERROR_INVALID_LEVEL — windows/amd64 + const ERROR_INVALID_NAME — windows/amd64 + const ERROR_MORE_DATA — windows/amd64 + const ERROR_NOT_ENOUGH_MEMORY — windows/amd64 + const MAX_GROUP_NAME_LENGTH — windows/amd64 + const MAX_PREFERRED_LENGTH — windows/amd64 + const NEGOSSP_NAME — windows/amd64 + const NERR_InternalError — windows/amd64 + const NERR_Success — windows/amd64 + const NERR_UserNotFound — windows/amd64 + const SECBUFFER_TOKEN — windows/amd64 + const SECBUFFER_VERSION — windows/amd64 + const SECPKG_ATTR_AUTHORITY — windows/amd64 + const SECPKG_ATTR_DCE_INFO — windows/amd64 + const SECPKG_ATTR_FLAGS — windows/amd64 + const SECPKG_ATTR_KEY_INFO — windows/amd64 + const SECPKG_ATTR_LIFESPAN — windows/amd64 + const SECPKG_ATTR_NAMES — windows/amd64 + const SECPKG_ATTR_NATIVE_NAMES — windows/amd64 + const SECPKG_ATTR_NEGOTIATION_INFO — windows/amd64 + const SECPKG_ATTR_PACKAGE_INFO — windows/amd64 + const SECPKG_ATTR_PASSWORD_EXPIRY — windows/amd64 + const SECPKG_ATTR_PROTO_INFO — windows/amd64 + const SECPKG_ATTR_SESSION_KEY — windows/amd64 + const SECPKG_ATTR_SIZES — windows/amd64 + const SECPKG_ATTR_STREAM_SIZES — windows/amd64 + const SECPKG_ATTR_USER_FLAGS — windows/amd64 + const SECPKG_CRED_INBOUND — windows/amd64 + const SECURITY_NATIVE_DREP — windows/amd64 + const SEC_E_INCOMPLETE_MESSAGE — windows/amd64 + const SEC_E_INSUFFICIENT_MEMORY — windows/amd64 + const SEC_E_INTERNAL_ERROR — windows/amd64 + const SEC_E_INVALID_HANDLE — windows/amd64 + const SEC_E_INVALID_TOKEN — windows/amd64 + const SEC_E_LOGON_DENIED — windows/amd64 + const SEC_E_NOT_OWNER — windows/amd64 + const SEC_E_NO_AUTHENTICATING_AUTHORITY — windows/amd64 + const SEC_E_NO_CREDENTIALS — windows/amd64 + const SEC_E_OK — windows/amd64 + const SEC_E_SECPKG_NOT_FOUND — windows/amd64 + const SEC_E_UNKNOWN_CREDENTIALS — windows/amd64 + const SEC_E_UNSUPPORTED_FUNCTION — windows/amd64 + const SEC_I_COMPLETE_AND_CONTINUE — windows/amd64 + const SEC_I_COMPLETE_NEEDED — windows/amd64 + const SEC_I_CONTINUE_NEEDED — windows/amd64 + const SE_GROUP_ENABLED — windows/amd64 + const SE_GROUP_ENABLED_BY_DEFAULT — windows/amd64 + const SE_GROUP_INTEGRITY — windows/amd64 + const SE_GROUP_INTEGRITY_ENABLED — windows/amd64 + const SE_GROUP_LOGON_ID — windows/amd64 + const SE_GROUP_MANDATORY — windows/amd64 + const SE_GROUP_OWNER — windows/amd64 + const SE_GROUP_RESOURCE — windows/amd64 + const SE_GROUP_USE_FOR_DENY_ONLY — windows/amd64 + var UserInfoKey = contextKey("UserInfo") — windows/amd64 + func UTF16PtrToString(ptr *uint16, maxLen int) (s string) + type API interface — windows/amd64 + AcceptSecurityContext func(credential *CredHandle, context *CtxtHandle, input *SecBufferDesc, ...) SECURITY_STATUS + AcquireCredentialsHandle func(principal *uint16, _package *uint16, credentialUse uint32, logonID *LUID, ...) SECURITY_STATUS + DeleteSecurityContext func(context *CtxtHandle) SECURITY_STATUS + FreeContextBuffer func(buffer *byte) SECURITY_STATUS + FreeCredentialsHandle func(handle *CredHandle) SECURITY_STATUS + NetApiBufferFree func(buf *byte) (neterr error) + NetUserGetGroups func(serverName *uint16, userName *uint16, level uint32, buf **byte, ...) (neterr error) + QueryContextAttributes func(context *CtxtHandle, attribute uint32, buffer *byte) SECURITY_STATUS + type Authenticator struct — windows/amd64 + Config Config + func New(config *Config) (*Authenticator, error) + func (a *Authenticator) AcceptOrContinue(context *CtxtHandle, authData []byte) (newCtx *CtxtHandle, out []byte, exp *time.Time, err error) + func (a *Authenticator) AppendAuthenticateHeader(w http.ResponseWriter, data string) + func (a *Authenticator) Authenticate(r *http.Request, w http.ResponseWriter) (userInfo *UserInfo, outToken string, err error) + func (a *Authenticator) Free() error + func (a *Authenticator) GetAuthData(r *http.Request, w http.ResponseWriter) (authData []byte, err error) + func (a *Authenticator) GetCtxHandle(r *http.Request) (*CtxtHandle, error) + func (a *Authenticator) GetFlags(context *CtxtHandle) (uint32, error) + func (a *Authenticator) GetUserGroups(userName string) (groups []string, err error) + func (a *Authenticator) GetUserInfo(context *CtxtHandle) (*UserInfo, error) + func (a *Authenticator) GetUsername(context *CtxtHandle) (username string, err error) + func (a *Authenticator) PrepareCredentials(principal string) error + func (a *Authenticator) ReleaseCtxHandle(handle *CtxtHandle) error + func (a *Authenticator) Return401(w http.ResponseWriter, data string) + func (a *Authenticator) SetCtxHandle(r *http.Request, w http.ResponseWriter, newContext *CtxtHandle) error + func (a *Authenticator) StoreCtxHandle(handle *CtxtHandle) + func (a *Authenticator) WithAuth(next http.Handler) http.Handler + type Config struct — windows/amd64 + AuthUserKey string + EnumerateGroups bool + KrbPrincipal string + ServerName string + func NewConfig() *Config + func (c *Config) Validate() error + type CredHandle struct — windows/amd64 + Lower uintptr + Upper uintptr + type CtxtHandle struct — windows/amd64 + Lower uintptr + Upper uintptr + type GroupUsersInfo0 struct — windows/amd64 + Grui0_name *uint16 + type GroupUsersInfo1 struct — windows/amd64 + Grui1_attributes uint32 + Grui1_name *uint16 + type LUID struct — windows/amd64 + HighPart int32 + LowPart uint32 + type SECURITY_STATUS syscall.Errno — windows/amd64 + type SecBuffer struct — windows/amd64 + Buffer *byte + BufferSize uint32 + BufferType uint32 + type SecBufferDesc struct — windows/amd64 + Buffers *SecBuffer + BuffersCount uint32 + Version uint32 + type SecPkgContext_Flags struct — windows/amd64 + Flags uint32 + type SecPkgContext_Names struct — windows/amd64 + UserName *uint16 + type UserInfo struct + Groups []string + Username string + type Win32 struct — windows/amd64 + func (w *Win32) AcceptSecurityContext(credential *CredHandle, context *CtxtHandle, input *SecBufferDesc, ...) SECURITY_STATUS + func (w *Win32) AcquireCredentialsHandle(principal *uint16, _package *uint16, credentialUse uint32, logonId *LUID, ...) SECURITY_STATUS + func (w *Win32) DeleteSecurityContext(context *CtxtHandle) SECURITY_STATUS + func (w *Win32) FreeContextBuffer(buffer *byte) SECURITY_STATUS + func (w *Win32) FreeCredentialsHandle(handle *CredHandle) SECURITY_STATUS + func (w *Win32) NetApiBufferFree(buf *byte) (neterr error) + func (w *Win32) NetUserGetGroups(serverName *uint16, userName *uint16, level uint32, buf **byte, ...) (neterr error) + func (w *Win32) QueryContextAttributes(context *CtxtHandle, attribute uint32, buffer *byte) SECURITY_STATUS