Package org.restheart.signup
Class VerificationCodeGenerator
java.lang.Object
org.restheart.signup.VerificationCodeGenerator
- All Implemented Interfaces:
ConfigurablePlugin,ExchangeTypeResolver<MongoRequest,,MongoResponse> Interceptor<MongoRequest,,MongoResponse> MongoInterceptor,Plugin
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>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(MongoRequest request, MongoResponse response) booleanresolve(MongoRequest request, MongoResponse response) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.restheart.plugins.ConfigurablePlugin
arg, argOrDefaultMethods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseType
-
Constructor Details
-
VerificationCodeGenerator
public VerificationCodeGenerator()
-
-
Method Details
-
handle
- Specified by:
handlein interfaceInterceptor<MongoRequest,MongoResponse> - Throws:
Exception
-
resolve
- Specified by:
resolvein interfaceInterceptor<MongoRequest,MongoResponse>
-