当前位置: 首页>>代码示例>>Java>>正文


Java Security类代码示例

本文整理汇总了Java中org.vaadin.spring.security.Security的典型用法代码示例。如果您正苦于以下问题:Java Security类的具体用法?Java Security怎么用?Java Security使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Security类属于org.vaadin.spring.security包,在下文中一共展示了Security类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SecuredNavigator

import org.vaadin.spring.security.Security; //导入依赖的package包/类
public SecuredNavigator(UI ui, ViewDisplay display, SpringViewProvider viewProvider, Security security, EventBus eventBus) {
	super(ui, display);		
	this.security = security;
	this.viewProvider = viewProvider;
	this.eventBus = eventBus;
	addProvider(this.viewProvider);
}
 
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample-SpringSecurity,代码行数:8,代码来源:SecuredNavigator.java

示例2: PreAuthorizeSpringViewProviderAccessDelegate

import org.vaadin.spring.security.Security; //导入依赖的package包/类
@Autowired
public PreAuthorizeSpringViewProviderAccessDelegate(Security security, ApplicationContext applicationContext) {
    this.security = security;
    this.applicationContext = applicationContext;
}
 
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample-SpringSecurity,代码行数:6,代码来源:PreAuthorizeSpringViewProviderAccessDelegate.java

示例3: SignInContent

import org.vaadin.spring.security.Security; //导入依赖的package包/类
public SignInContent(Security security) {
	super();
	setSizeFull();
	setSpacing(true);
	
	this.security = security;
	
	caption = new Label("Sign in to Vaadin4Spring Security Social Demo");
	caption.addStyleName(ValoTheme.LABEL_H2);
	caption.setSizeUndefined();		
	addComponent(caption);
	setComponentAlignment(caption, Alignment.MIDDLE_CENTER);
	
	loginPanel = new VerticalLayout();
	loginPanel.setSizeUndefined();
	loginPanel.setSpacing(true);
	loginPanel.setMargin(true);
	addComponent(loginPanel);
	setComponentAlignment(loginPanel, Alignment.MIDDLE_CENTER);
	setExpandRatio(loginPanel, 1);
	
	errorMessage = new Label();
	errorMessage.setWidth("300px");
	errorMessage.addStyleName(ValoTheme.LABEL_FAILURE);		
	errorMessage.setVisible(false);
	loginPanel.addComponent(errorMessage);
	
	username = new TextField("Username");
	username.setImmediate(true);
	username.setWidth("300px");
	loginPanel.addComponent(username);
	
	password = new PasswordField("Password");
	password.setImmediate(true);
	password.setWidth("300px");
	loginPanel.addComponent(password);
	
	btnLogin = new Button("Signin", FontAwesome.UNLOCK);
	btnLogin.addStyleName(ValoTheme.BUTTON_PRIMARY);
	btnLogin.addClickListener(this);
	btnLogin.setWidth("100%");
	loginPanel.addComponent(btnLogin);						
	
	btnFacebookLogin = new Button("Signin with Facebook", FontAwesome.FACEBOOK);
	btnFacebookLogin.addStyleName(ValoTheme.BUTTON_PRIMARY);
	btnFacebookLogin.setWidth("100%");
	btnFacebookLogin.addClickListener(this);
	loginPanel.addComponent(btnFacebookLogin);
			
	btnGoogleLogin = new Button("Signin with Google", FontAwesome.GOOGLE_PLUS);
	btnGoogleLogin.addStyleName(ValoTheme.BUTTON_PRIMARY);
	btnGoogleLogin.setWidth("100%");
	btnGoogleLogin.addClickListener(this);
	loginPanel.addComponent(btnGoogleLogin);		
	
	final Label infoLabel = new Label(FontAwesome.INFO_CIRCLE.getHtml() + " You can sign in with username \"user\" and password \"user\".", ContentMode.HTML);
	infoLabel.setWidth("300px");
	loginPanel.addComponent(infoLabel);
}
 
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample-SpringSecuritySocial,代码行数:60,代码来源:SignInContent.java


注:本文中的org.vaadin.spring.security.Security类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。