mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 05:19:13 +00:00
very wip auth with kbint (cant actually do anything cos i cba to make a server with kbint auth)
This commit is contained in:
@@ -307,6 +307,21 @@ class SSHHandler: @unchecked Sendable, ObservableObject {
|
||||
return
|
||||
}
|
||||
|
||||
//MARK: very wip
|
||||
// func authWithKbint() {
|
||||
// withAnimation { state = .authorizingKbint }
|
||||
//
|
||||
// let status = ssh_userauth_kbdint(session, nil, nil)
|
||||
// if status == SSH_AUTH_INFO.rawValue {
|
||||
// print(ssh_userauth_kbdint_getnprompts(session))
|
||||
// print(ssh_userauth_kbdint_getname(session))
|
||||
// print(ssh_userauth_kbdint_getinstruction(session))
|
||||
// print(ssh_userauth_kbdint_getprompt(session, <#T##i: UInt32##UInt32#>, <#T##echo: UnsafeMutablePointer<CChar>!##UnsafeMutablePointer<CChar>!#>))
|
||||
// }
|
||||
//
|
||||
//// for prompt in
|
||||
// }
|
||||
|
||||
func getAuthMethods() -> [AuthType] {
|
||||
var result: [AuthType] = []
|
||||
let recievedMethod = UInt32(ssh_userauth_list(session, nil))
|
||||
|
||||
@@ -12,6 +12,7 @@ enum SSHState {
|
||||
case idle
|
||||
case connecting
|
||||
case authorizing
|
||||
case authorizingKbint
|
||||
case authorized
|
||||
case shellOpen
|
||||
|
||||
@@ -23,7 +24,7 @@ enum SSHState {
|
||||
case .idle:
|
||||
return .gray
|
||||
|
||||
case .connecting, .authorizing:
|
||||
case .connecting, .authorizing, .authorizingKbint:
|
||||
return .orange
|
||||
|
||||
case .authorized, .shellOpen:
|
||||
|
||||
Reference in New Issue
Block a user