001package org.deepamehta.plugins.signup.service; 002 003 004import com.sun.jersey.api.view.Viewable; 005 006/** 007 * 008 * @name dm4-sign-up 009 * @website https://github.com/mukil/dm4-sign-up 010 * @version 1.1-SNAPSHOT 011 * @author <a href="mailto:malte@mikromedia.de">Malte Reissig</a>; 012 */ 013 014public interface SignupPluginService { 015 016 /** 017 * Checks for a Topic with the exact "username" value. 018 * 019 * @return String JSON-Object with property "isAvailable" set to true or false 020 */ 021 String getUsernameAvailability(String username); 022 023 /** 024 * Handles a sign-up request in regards to whether an Email based confirmation process is configured (true|false) 025 * in the resp. <code>Sign-up Configuration</code> topic. 026 * 027 * To check whether a username is already taken you *must* use the getUsernameAvailability() call before issueing 028 * an account creation request via this method. 029 * 030 * @param username String Unique username. 031 * @param password String SHA256 encoded password with a prefix of "-SHA26-" 032 * @param mailbox String containing a valid Email address related to the account creation request. 033 * 034 * @return String username 035 */ 036 Viewable handleSignupRequest(String username, String password, String mailbox); 037 038}