Class VerificationCodeGenerator

java.lang.Object
org.restheart.signup.VerificationCodeGenerator
All Implemented Interfaces:
ConfigurablePlugin, ExchangeTypeResolver<MongoRequest,MongoResponse>, Interceptor<MongoRequest,MongoResponse>, MongoInterceptor, Plugin

public class VerificationCodeGenerator extends Object implements MongoInterceptor
whan an unauthenticated client creates a user user document, this interceptor adds the verification code and sets the roles to UNVERIFIED it also forbids the client to update an existing document it assumes that the user collection is 'users' and the roles property is 'roles' (the default configuration values of mongoRealAuthenticator)
Author:
Andrea Di Cesare <andrea@softinstigate.com>