Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SecurityManager initialization #7 #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DaniloAndrade
Copy link

This corrects the "SecurityManager initialization" problem, but it will be necessary to update the doc for the plugin users to create a Class that listens to the "VRaptorInitialized" VRaptor initialization event and triggers the VRaptor-Shiro boot event "VRaptorShiroInit"

Here is an example of the class that should be implemented in projects that use the "vraptor-shiro" plugin.

import br.com.caelum.vraptor.events.VRaptorInitialized;
import br.com.caelum.vraptor.security.produces.VRaptorShiroInit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.enterprise.event.Event;
import javax.enterprise.event.Observes;
import javax.inject.Inject;


public class VRaptorShiroInitialization {

	private static final Logger log = LoggerFactory.getLogger(VRaptorShiroInitialization.class);

	@Inject
	private Event<VRaptorShiroInit> shiroEvents;


	protected void init(@Observes VRaptorInitialized initializedEvent){
		shiroEvents.fire(new VRaptorShiroInit("Project [example] initialized"));
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant