mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	Before, the SSPI auth is only complied for Windows, it's difficult to test and it breaks a lot. Now, make the SSPI auth mockable and testable.
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			330 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			330 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright 2023 The Gitea Authors. All rights reserved.
 | |
| // SPDX-License-Identifier: MIT
 | |
| 
 | |
| //go:build windows
 | |
| 
 | |
| package auth
 | |
| 
 | |
| import (
 | |
| 	"github.com/quasoft/websspi"
 | |
| )
 | |
| 
 | |
| type SSPIUserInfo = websspi.UserInfo
 | |
| 
 | |
| func sspiAuthInit() error {
 | |
| 	var err error
 | |
| 	config := websspi.NewConfig()
 | |
| 	sspiAuth, err = websspi.New(config)
 | |
| 	return err
 | |
| }
 |