我正在尝试使用Jetty嵌入式服务器来公开我的Rest API,现在我想实现Kerberos身份验证.这就是我创建SecurityHandler的方式
String domainRealm = "MY.COM";
Constraint constraint = new Constraint();
constraint.setName(Constraint.__SPNEGO_AUTH);
constraint.setRoles(new String[]{domainRealm});
constraint.setAuthenticate(true);
ConstraintMapping cm = new ConstraintMapping();
cm.setConstraint(constraint);
cm.setPathSpec("/*");
SpnegoLoginService loginService = new SpnegoLoginService();
loginService.setConfig("/path/to/spnego.properties");
loginService.setName(domainRealm);
ConstraintSecurityHandler sh = new ConstraintSecurityHandler();
sh.setAuthenticator(new SpnegoAuthenticator());
sh.setLoginService(loginService);
sh.setConstraintMappings(new ConstraintMapping[]{cm});
sh.setRealmName(domainRealm);
Run Code Online (Sandbox Code Playgroud)
这是我的spnego.properties:
targetName = HTTP/target.name.com
Run Code Online (Sandbox Code Playgroud)
我的krb5.ini:
[libdefaults]
default_realm = HW.COM
default_keytab_name = FILE:/path/to/target.name.com.keytab
permitted_enctypes = aes128-cts aes256-cts arcfour-hmac-md5
default_tgs_enctypes = aes128-cts aes256-cts arcfour-hmac-md5
default_tkt_enctypes = aes128-cts aes256-cts arcfour-hmac-md5
[realms]
MY.COM= {
kdc = 12.13.14.222 #IP adress
admin_server = 12.13.14.222 # IP …Run Code Online (Sandbox Code Playgroud) 新的iOS 6功能是,你可以在桌面游戏中调试在设备或模拟器上运行的html和javascript.我想,此功能基于Webkit远程调试协议.
如何在没有桌面Safari的情况下连接到在iPhone上运行的webkit?
我可以使用websockets在Android上运行的移动Chrome上执行此操作,但我该如何为iOS设备执行此操作?
我正在开发通过 webkit 调试协议进行通信的 webkit 调试器。我的调试器适用于移动 Chrome。我只是做
adb forward tcp:9222 localabstract:chrome_devtools_remote
Run Code Online (Sandbox Code Playgroud)
然后我可以连接到localhost:9222/json并列出可用页面并通过 webkit 调试协议连接到适当的网络套接字。如何为新的 Android 4.4 Web Views 做同样的事情?我知道如何使用 chrome 来调试 android web 视图。我的问题是如何使用API直接连接webview的调试协议。localhost:9222/json为空,当我的网络视图在设备上打开时。谢谢