コード例 #1
0
 @Override
 public boolean nonauthenticateoperation(ByteBuffer token, String operationRelatedData)
     throws PlugException, TException {
   AuthenticationToken t = getToken(token);
   if (auth.authenticate(t))
     try {
       System.out.println("User " + auth.getUser(t) + " is doing " + operationRelatedData);
       return true;
     } catch (Exception e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
       return false;
     }
   return false;
   // }
   // return false;
 }
コード例 #2
0
 @Override
 public boolean authenticate(ByteBuffer tokenBytes) throws PlugException, TException {
   return auth.authenticate(getToken(tokenBytes));
 }
コード例 #3
0
 @Override
 public String authenticationClass() throws TException {
   return auth.getClass().getCanonicalName();
 }