我已經擴展AbstractUserStoreManager類並在doAuthenticate()方法中覆蓋代碼來執行自定義身份驗證過程。當我使用憑證登錄時,doAuthenticate方法正確返回true。wso2身份服務器 - 擴展AbstractUserStoreManager類和doAuthenticate()方法
但是,wso2身份服務器用戶管理控制檯仍在丟失登錄失敗消息。 (即正在調用CarbonAuthenticationUtil.onFailedAdminLogin方法)。
這可能是一個問題,無法顯示該用戶是否具有管理員角色。
但是,我在每種方法中都放了一些日誌記錄,以查看什麼是觸發。然而,我沒有看到任何方法在doAuthenticate()方法被觸發後檢查角色被觸發。
任何人都可以指向正確的方向嗎?
這裏是日誌運行在DEBUG冗長:
[2013-03-15 15:17:55,669] DEBUG - getRequestAddressingRequirementParameterValue: got value from MessageContext [MessageContext: logID=cd1ae48ec92e8ccb25cd294c255c695acb01113f991655f8], value: 'null' {org.apache.axis2.addressing.AddressingHelper}
[2013-03-15 15:17:55,669] DEBUG - getRequestAddressingRequirementParameterValue: value: 'null' {org.apache.axis2.addressing.AddressingHelper}
[2013-03-15 15:17:55,669] DEBUG - getRequestAddressingRequirementParameterValue: value: 'null' {org.apache.axis2.addressing.AddressingHelper}
[2013-03-15 15:17:55,670] DEBUG - [MessageContext: logID=dd1ae48ec92e8ccb25cd294c255c695acb01113f991655f8] isReplyRedirected: ReplyTo is null. Returning false {org.apache.axis2.addressing.AddressingHelper}
[2013-03-15 15:17:55,670] DEBUG - [MessageContext: logID=dd1ae48ec92e8ccb25cd294c255c695acb01113f991655f8] isReplyRedirected: ReplyTo is null. Returning false {org.apache.axis2.addressing.AddressingHelper}
[2013-03-15 15:17:55,670] INFO - isAuthenticated?: true {com.dg.rio.proxy.user.store.DGProxyReadOnlyUserStoreManager}
[2013-03-15 15:17:55,670] DEBUG - Post authenticator is called in IdentityMgtEventListener {org.wso2.carbon.identity.mgt.IdentityMgtEventListener}
[2013-03-15 15:17:55,670] DEBUG - Post authenticator is called in IdentityMgtEventListener {org.wso2.carbon.identity.mgt.IdentityMgtEventListener}
[2013-03-15 15:17:55,671] DEBUG - AUTHORIZATION_CACHE Memory cache hit, but element expired {net.sf.ehcache.Cache}
[2013-03-15 15:17:55,672] ERROR - System error while Authenticating/Authorizing User : null {org.wso2.carbon.core.services.authentication.AuthenticationAdmin}
java.lang.NullPointerException
at org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager.isUserAuthorized(JDBCAuthorizationManager.java:134)
at org.wso2.carbon.core.services.authentication.AuthenticationAdmin.login(AuthenticationAdmin.java:107)