-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement SSPI Support on Windows (oc Kerberos)
This change is highly experimental and includes no tests (because you need an automated extended test with a fully configured Windows Active Directory server to actually test this). Signed-off-by: Monis Khan <[email protected]>
- Loading branch information
Showing
7 changed files
with
373 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package tokencmd | ||
|
||
import ( | ||
"errors" | ||
"net/url" | ||
) | ||
|
||
func getServiceName(sep rune, requestURL string) (string, error) { | ||
u, err := url.Parse(requestURL) | ||
if err != nil { | ||
return "", err | ||
} | ||
|
||
return "HTTP" + string(sep) + u.Hostname(), nil | ||
} | ||
|
||
type negotiateUnsupported struct { | ||
error | ||
} | ||
|
||
func newUnsupportedNegotiator(name string) Negotiator { | ||
return &negotiateUnsupported{error: errors.New(name + " support is not enabled")} | ||
} | ||
|
||
func (n *negotiateUnsupported) Load() error { | ||
return n | ||
} | ||
|
||
func (n *negotiateUnsupported) InitSecContext(requestURL string, challengeToken []byte) ([]byte, error) { | ||
return nil, n | ||
} | ||
|
||
func (*negotiateUnsupported) IsComplete() bool { | ||
return false | ||
} | ||
|
||
func (n *negotiateUnsupported) Release() error { | ||
return n | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.