public Builder accountId(String accountId) { if (accountId != null) { throw new JmapFieldNotSupportedException(ISSUER, "accountId"); } return this; }
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { returnEndPointsResponse(resp); }
public void handle(String contentType, InputStream content, MailboxSession mailboxSession, HttpServletResponse response) throws IOException, MailboxException { UploadResponse storedContent = uploadContent(contentType, content, mailboxSession); buildResponse(response, storedContent); }
public static Builder newConfigurationBuilder() { return JMAPConfiguration.builder() .enable() .keystore("keystore") .secret("james72laBalle") .jwtPublicKeyPem(Optional.of(JWT_PUBLIC_KEY)); }
default AccessToken accessTokenFor(GuiceJamesServer james, String user, String password) { return authenticateJamesUser(baseUri(james), user, password); }
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest)request; if (shouldBypassAuth(httpRequest)) { bypassAuth(request, response, chain); } else { tryAuth(httpRequest, response, chain); } }
private void tryAuth(HttpServletRequest httpRequest, ServletResponse response, FilterChain chain) throws IOException, ServletException { authenticationFilter.doFilter(httpRequest, response, chain); }
public static String getOutboxId(AccessToken accessToken) { return getMailboxId(accessToken, Role.OUTBOX); }
public static Builder builder() { return new Builder(); }
private boolean isTextMessageReceived(AccessToken recipientToken, String mailboxId, String expectedTextBody, String expectedFrom, String expectedTo) { try { assertOneMessageReceived(recipientToken, mailboxId, expectedTextBody, expectedFrom, expectedTo); return true; } catch (AssertionError e) { return false; } }
public UserCredentials build() { return new UserCredentials(username, password); } }
private String getInboxId(AccessToken accessToken) { return getMailboxIdByRole(accessToken, DefaultMailboxes.INBOX); }
public Builder accountId(String accountId) { if (accountId != null) { throw new JmapFieldNotSupportedException(ISSUER, "accountId"); } return this; }
public static String getDraftId(AccessToken accessToken) { return getMailboxId(accessToken, Role.DRAFTS); }
public Builder ifInState(String ifInState) { if (ifInState != null) { throw new JmapFieldNotSupportedException(ISSUER, "ifInState"); } return this; }
public Builder accountId(String accountId) { if (accountId != null) { throw new JmapFieldNotSupportedException(ISSUER, "accountId"); } return this; }
public Builder ifInState(String ifInState) { if (ifInState != null) { throw new JmapFieldNotSupportedException(ISSUER, "ifInState"); } return this; }
public Builder accountId(String accountId) { if (accountId != null) { throw new JmapFieldNotSupportedException(ISSUER, "accountId"); } return this; }
public Builder accountId(String accountId) { if (accountId != null) { throw new JmapFieldNotSupportedException(ISSUER, "accountId"); } return this; }
public Builder accountId(String accountId) { throw new JmapFieldNotSupportedException(ISSUER, "accountId"); }