• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java MessageSecurityMetadataSourceRegistry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
    messages

            .simpTypeMatchers(SimpMessageType.CONNECT, SimpMessageType.HEARTBEAT, SimpMessageType.UNSUBSCRIBE, SimpMessageType.DISCONNECT).permitAll()
            // matches any destination that starts with /rooms/
            .simpDestMatchers(WS_API.QUEUE_DESTINATION_PREFIX + "**").authenticated()
            .simpDestMatchers(WS_API.TOPIC_DESTINATION_PREFIX + "**").authenticated()
            // (i.e. cannot send messages directly to /topic/, /queue/)
            // (i.e. cannot subscribe to /topic/messages/* to get messages sent to
            // /topic/messages-user<id>)
            .simpTypeMatchers(SimpMessageType.MESSAGE, SimpMessageType.SUBSCRIBE).authenticated()
            // catch all
            .anyMessage().authenticated();

    // https://github.com/jhipster/generator-jhipster/issues/1370
    //.simpMessageDestMatchers("/queue/**", "/topic/**").denyAll()
    //.simpSubscribeDestMatchers("/queue/**/*-user*", "/topic/**/*-user*").denyAll()
    //.anyMessage().authenticated();

}
 
开发者ID:Pivopil,项目名称:spring-boot-oauth2-rest-service-password-encoding,代码行数:22,代码来源:WebSocketSecurityConfig.java


示例2: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
    messages
        // message types other than MESSAGE and SUBSCRIBE
        .nullDestMatcher().permitAll()
        // matches any destination that starts with /rooms/
        .simpMessageDestMatchers("/topic/player_commands").hasAuthority(AuthoritiesConstants.ADMIN)
        .simpSubscribeDestMatchers("/topic/player_events").permitAll()
        .simpMessageDestMatchers("/topic/vote_commands").authenticated()
        .simpSubscribeDestMatchers("/topic/vote_events").permitAll()
        // (i.e. cannot send messages directly to /topic/, /queue/)
        // (i.e. cannot subscribe to /topic/messages/* to get messages sent to
        // /topic/messages-user<id>)
        .simpTypeMatchers(SimpMessageType.MESSAGE, SimpMessageType.SUBSCRIBE).denyAll()
        // catch all
        .anyMessage().denyAll();
}
 
开发者ID:xxmicloxx,项目名称:TSMusicBot,代码行数:18,代码来源:WebsocketSecurityConfiguration.java


示例3: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
    messages
        // message types other than MESSAGE and SUBSCRIBE
        .nullDestMatcher().authenticated()
        // matches any destination that starts with /rooms/
        .simpDestMatchers("/topic/tracker").hasAuthority(AuthoritiesConstants.ADMIN)
        .simpDestMatchers("/topic/**").authenticated()
        // (i.e. cannot send messages directly to /topic/, /queue/)
        // (i.e. cannot subscribe to /topic/messages/* to get messages sent to
        // /topic/messages-user<id>)
        .simpTypeMatchers(SimpMessageType.MESSAGE, SimpMessageType.SUBSCRIBE).denyAll()
        // catch all
        .anyMessage().denyAll();
}
 
开发者ID:GastonMauroDiaz,项目名称:buenojo,代码行数:16,代码来源:WebsocketSecurityConfiguration.java


示例4: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
    messages
        .nullDestMatcher().authenticated()
        .simpDestMatchers("/topic/tracker").hasAuthority(AuthoritiesConstants.ADMIN)
        // matches any destination that starts with /topic/
        // (i.e. cannot send messages directly to /topic/)
        // (i.e. cannot subscribe to /topic/messages/* to get messages sent to
        // /topic/messages-user<id>)
        .simpDestMatchers("/topic/**").authenticated()
        // message types other than MESSAGE and SUBSCRIBE
        .simpTypeMatchers(SimpMessageType.MESSAGE, SimpMessageType.SUBSCRIBE).denyAll()
        // catch all
        .anyMessage().denyAll();
}
 
开发者ID:ElectronicArmory,项目名称:Armory,代码行数:16,代码来源:WebsocketSecurityConfiguration.java


示例5: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
	messages
		.simpMessageDestMatchers("/queue/**", "/topic/**").denyAll()
		.simpSubscribeDestMatchers("/queue/**/*-user*", "/topic/**/*-user*").denyAll()
		.anyMessage().authenticated();
}
 
开发者ID:xianrendzw,项目名称:CodeMaster,代码行数:8,代码来源:WebSocketSecurityConfig.java


示例6: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
    messages.simpMessageDestMatchers("/**").authenticated()
            .simpSubscribeDestMatchers("/**").permitAll()
            .anyMessage().authenticated()
    ;
}
 
开发者ID:HeroXXiv,项目名称:Robocode,代码行数:8,代码来源:WebSocketConfig.java


示例7: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
    messages
        // message types other than MESSAGE and SUBSCRIBE
        .nullDestMatcher().authenticated()
        // matches any destination that starts with /rooms/
        .simpDestMatchers("/topic/**").authenticated()
        // (i.e. cannot send messages directly to /topic/, /queue/)
        // (i.e. cannot subscribe to /topic/messages/* to get messages sent to
        // /topic/messages-user<id>)
        .simpTypeMatchers(SimpMessageType.MESSAGE, SimpMessageType.SUBSCRIBE).denyAll()
        // catch all
        .anyMessage().denyAll();
}
 
开发者ID:ServiceCutter,项目名称:ServiceCutter,代码行数:15,代码来源:WebsocketSecurityConfiguration.java


示例8: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
  messages
    .nullDestMatcher().authenticated()
    .simpDestMatchers("/topic/tracker").hasAuthority(AuthoritiesConstants.ADMIN)
    .simpDestMatchers("/topic/**").authenticated()
    .simpTypeMatchers(SimpMessageType.MESSAGE, SimpMessageType.SUBSCRIBE).denyAll()
    .anyMessage().denyAll();
}
 
开发者ID:priitl,项目名称:p2p-webtv,代码行数:10,代码来源:WebSocketSecurityConfiguration.java


示例9: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
    protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
        // Waiting on a response here: https://jira.spring.io/browse/SEC-2802
//        messages
//                .antMatchers(SimpMessageType.MESSAGE, "/user/queue/errors").permitAll()
//                .antMatchers(SimpMessageType.MESSAGE, "/user/*").hasRole("USER")
//                .antMatchers(SimpMessageType.MESSAGE, "/app/user/*").hasRole("USER")
//                .anyMessage().permitAll();
    }
 
开发者ID:bjornharvold,项目名称:bearchoke,代码行数:10,代码来源:WebSocketSecurityConfig.java


示例10: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(final MessageSecurityMetadataSourceRegistry messages) {
    messages.anyMessage().authenticated();
}
 
开发者ID:anthonyraymond,项目名称:joal,代码行数:5,代码来源:WebSocketAuthorizationSecurityConfig.java


示例11: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
    messages.simpDestMatchers("/**").permitAll();
}
 
开发者ID:swri-robotics,项目名称:bag-database,代码行数:5,代码来源:WebSocketSecurityConfig.java


示例12: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
    messages.nullDestMatcher().authenticated()
            .simpSubscribeDestMatchers("/logs").hasRole("ADMIN");
}
 
开发者ID:SungardAS,项目名称:enhanced-snapshots,代码行数:5,代码来源:WebSocketSecurityConfig.java


示例13: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(final MessageSecurityMetadataSourceRegistry messages) {
    messages.anyMessage().permitAll();
}
 
开发者ID:kTT,项目名称:adjule,代码行数:5,代码来源:WebSocketSecurityConfig.java


示例14: configureInbound

import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; //导入依赖的package包/类
@Override
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
   	
	messages
	.simpMessageDestMatchers(Constants.WS_TOPIC_ACTIVITY_FEED_PATH, "/queue/*", "/app/queue/*").permitAll();
	
}
 
开发者ID:alex-bretet,项目名称:cloudstreetmarket.com,代码行数:8,代码来源:WebSocketSecurityConfig.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Metadata类代码示例发布时间:2022-05-21
下一篇:
Java SingletonBeanRegistry类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap