606162636465666768
IdentifiedUser provideCurrentUser(CurrentUser user) { if (user instanceof IdentifiedUser) { return (IdentifiedUser) user; } throw new ProvisionException(NotSignedInException.MESSAGE, new NotSignedInException()); } }; }
70717273747576777879
// If SignInRequired is set on this method we must have both a // valid XSRF token *and* have the user signed in. Doing these // checks also validates that they agree on the user identity. // if (!call.requireXsrfValid() || !session.get().isSignedIn()) { call.onFailure(new NotSignedInException()); return; } } }