Package org.jboss.jms.server.security

Examples of org.jboss.jms.server.security.SecurityMetadata


/*     */
/* 280 */     boolean isQueue = jbd.isQueue();
/* 281 */     String name = jbd.getName();
/*     */
/* 283 */     SecurityStore sm = conn.getSecurityManager();
/* 284 */     SecurityMetadata securityMetadata = sm.getSecurityMetadata(isQueue, name);
/*     */
/* 286 */     if (securityMetadata == null)
/*     */     {
/* 288 */       throw new JMSSecurityException("No security configuration avaliable for " + name);
/*     */     }
/*     */
/* 296 */     sm.authenticate(conn.getUsername(), conn.getPassword());
/*     */
/* 299 */     Set principals = checkType == CheckType.WRITE ? securityMetadata.getWritePrincipals() : checkType == CheckType.READ ? securityMetadata.getReadPrincipals() : securityMetadata.getCreatePrincipals();
/*     */     try
/*     */     {
/* 304 */       if (!sm.authorize(conn.getUsername(), principals, checkType))
/*     */       {
/* 306 */         String msg = "User: " + conn.getUsername() + " is not authorized to " + (checkType == CheckType.WRITE ? "write to" : checkType == CheckType.READ ? "read from" : "create durable sub on") + " destination " + name;
View Full Code Here

TOP

Related Classes of org.jboss.jms.server.security.SecurityMetadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.