Hello

I have a class which extends from AuthrizingRealm, like the following

public class UserRealm extends AuthorizingRealm {


    protected AuthenticationInfo
doGetAuthenticationInfo(AuthenticationToken authcToken) throws
AuthenticationException {
      ............

       UsernamePasswordToken token = (UsernamePasswordToken) authcToken;

       if(token.getHost().equals("www.abc.com")) {
          .................

       }
       ...................
    }


    protected AuthorizationInfo
doGetAuthorizationInfo(PrincipalCollection principals) {
        String loginName = (String)
principals.fromRealm(getName()).iterator().next();
        ......
    }

}

I want to get the host name in the doGetAuthorizationInfo method, just
like what to do in the doGetAuthenticationInfo method

What should i do?

Thanks

Reply via email to