@Test public void testAuthenticate_假如用户authentication正确且有对请求url只有POST权限_当用户请求该url的GET_那么返回成功无权限() { when(authProvider.auth(BEARER + VALID_TOKEN, "/users", "GET")).thenReturn(Result.success(false)); Assert.assertFalse((Boolean) authService.authenticate(BEARER + VALID_TOKEN, "/users", "GET").getData()); }
@Override public Result authenticate(String authentication, String url, String method) { return authProvider.auth(authentication, url, method); }
AuthService implements IAuthService { @Override public Result authenticate(String authentication, String url, String method) { return authProvider.auth(authentication, url, method); } }
AuthService implements IAuthService { @Override public Result authenticate(String authentication, String url, String method) { return authProvider.auth(authentication, url, method); }  }
AuthService implements IAuthService { @Override public Result authenticate(String authentication, String url, String method) { return authProvider.auth(authentication, url, method); }  @Override Result authenticate(String authentication, String url, String method); @Override boolean ignoreAuthentication(String url); @Override boolean hasPermission(Result authResult); @Override boolean hasPermission(String authentication, String url, String method); @Override boolean invalidJwtAccessToken(String authentication); @Override Jwt getJwt(String authentication); }
AuthService implements IAuthService { @Override public Result authenticate(String authentication, String url, String method) { return authProvider.auth(authentication, url, method); }  @Override Result authenticate(String authentication, String url, String method); @Override boolean ignoreAuthentication(String url); @Override boolean hasPermission(Result authResult); @Override boolean hasPermission(String authentication, String url, String method); @Override boolean invalidJwtAccessToken(String authentication); @Override Jwt getJwt(String authentication);  }