java ee api
Java EE安全API( JSR 375 )正在向前发展,正如Arjan Tijms在此处概述的那样 : http : //arjan-tijms.omnifaces.org/p/whats-new-in-java-ee-security-api-10 。 html 。
需要注意的一件事是,我们现在为参考实现有了一个名称,即Soteria 。 这个名字起源于希腊神话,Soteria是安全和救赎的女神[ Wikipedia ]。 我们的Soteria可以在GitHub( https://github.com/javaee-security-spec/soteria )上找到,并具有Twitter句柄。 跟随@Soteria_RI 。
Soteria GitHub存储库包含几个示例,这些示例演示了到目前为止实现的功能。 我创建了两个其他示例,将Soteria与其他Java EE技术(例如MVC和JSF)结合在一起。 这些可以在https://github.com/ivargrimstad/security-samples中找到。
如以下代码所示,为MVC 1.0应用程序定义嵌入式身份存储非常简单。
@EmbeddedIdentityStoreDefinition({@Credentials(callerName = "hem", password = "cheese", groups = {"foo"}),@Credentials(callerName = "haw", password = "cheeze", groups = {"foo", "bar"})}
)
@DeclareRoles({"foo", "bar"})
@ApplicationPath("ui")
public class ApplicationConfig extends Application {@Overridepublic Set<Class<?>> getClasses() {Set<Class<?>> classes = new HashSet<>();// add controllersreturn classes;}
这些示例将随着规范和Soteria的不断发展而发展。
翻译自: https://www.javacodegeeks.com/2016/02/java-ee-security-api-moving-forward.html
java ee api