论坛首页 Java企业应用论坛

学习Acegi-认证(authentication)

浏览 35960 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-03-30  
这些其实都不怎么难,
主要是多个程序如何整合,也就是单点登录

比如 : 原先的web站点,论坛(mvnforum),blog(jroller),

这些东西如何整合?

更详细的信息可以看看这个: http://xmlspy.iteye.com/admin/show/66745
0 请登录后投票
   发表时间:2007-04-02  
按楼主说的做,报错,原因何在?
严重: Error listenerStart
2007-4-2 18:10:17 org.apache.catalina.core.StandardContext start
严重: Context startup failed due to previous errors
0 请登录后投票
   发表时间:2007-04-02  
cjcmailcjc 写道
按楼主说的做,报错,原因何在?
严重: Error listenerStart
2007-4-2 18:10:17 org.apache.catalina.core.StandardContext start
严重: Context startup failed due to previous errors
listener启动出现错误,应该是缺少某个包!
0 请登录后投票
   发表时间:2007-04-04  
按楼主说的做,报错,检查所有文件和库已经在TOMCAT_HOME/webapps/下,不知原因何在?
HTTP Status 404 - /acegiexample/
type Status report

message /acegiexample/
description The requested resource (/acegiexample/) is not available.

Apache Tomcat/5.5.20

我的环境(Eclipse3.2+MyEclipse5.1+Tomcat5.5)
0 请登录后投票
   发表时间:2007-04-21  
选择"2周内自动登录"时

不稳定

单次正常,偶次时还是要登录


奇怪
0 请登录后投票
   发表时间:2007-08-02  
对acegi不是很熟悉但很感兴趣,请问如果通过了认证以后,相关的应用代码怎样获得当前主体的信息?比如登录的用户名什么的,因为有时候应用代码需要的到这些相关的信息来进行相关的处理。只看到说这些信息会存在ContextHolder里面,但具体怎么取出来使用呢?看了一下手册,是不是这样使用:
Inside the SecurityContextHolder we store details of the principal currently interacting with the application. Acegi Security uses an Authentication object to represent this information. Whilst you won't normally need to create an Authentication object yourself, it is fairly common for users to query the Authentication  object. You can use the following code block - from anywhere in your application - to do this:
Object obj = SecurityContextHolder.getContext().getAuthentication().getPrincipal();

if (obj instanceof UserDetails) {
  String username = ((UserDetails)obj).getUsername();
} else {
  String username = obj.toString();
}

0 请登录后投票
   发表时间:2007-08-11  
acegi的登陆消息只在login.jsf?error=true这个链接上体现错误,但是详细错误怎么获得呢?是没有这个用户名?还是密码错误?还是没用enabled。。
有人知道怎么处理更加详细的登录错误消息吗?
0 请登录后投票
   发表时间:2007-08-18  
<bean id="jdbcDaoImpl" class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl"> 
        <property name="dataSource"><ref bean="dataSource"/></property> 
    </bean> 
这个似乎少了两个属性参数
<property name="usersByUsernameQuery">
            <value>SELECT username,password,enabled FROM app_user WHERE username = ?</value>
        </property>
        <property name="authoritiesByUsernameQuery">
            <value>SELECT username,role_name FROM user_role WHERE username = ?</value>
        </property>
0 请登录后投票
   发表时间:2007-08-21  
没明白 用户验证的地方,怎么验证的,开始是把用户信息写成了<value>aaa=123</value>这种形式,可后来转换为数据库后,只写了个daoimp类,然后又指定的数据原,在后来就没明白了
0 请登录后投票
   发表时间:2007-08-21  
wl1985 写道
<bean id="jdbcDaoImpl" class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl"> 
        <property name="dataSource"><ref bean="dataSource"/></property> 
    </bean> 
这个似乎少了两个属性参数
<property name="usersByUsernameQuery">
            <value>SELECT username,password,enabled FROM app_user WHERE username = ?</value>
        </property>
        <property name="authoritiesByUsernameQuery">
            <value>SELECT username,role_name FROM user_role WHERE username = ?</value>
        </property>


应该是对的吧.
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics