This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| insert into users values('iocanel','a564de63c2d0da68cf47586ee05984d7'); | |
| insert into roles values('iocanel','manager'); | |
| insert into roles values('iocanel','roles'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <blueprint xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> | |
| <bean class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" id="mysqlDatasource"> | |
| <property name="serverName" value="localhost"></property> | |
| <property name="databaseName" value="username_here"></property> | |
| <property name="port" value="3306"></property> | |
| <property name="user" value="root"></property> | |
| <property name="password" value="password_here"></property> | |
| </bean> | |
| <service id="mysqlDS" interface="javax.sql.DataSource" ref="mysqlDatasource"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <blueprint xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> | |
| <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"> </ext:property-placeholder> | |
| <jaas:config name="blog"> | |
| <jaas:module classname="org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule" flags="required"> | |
| datasource = osgi:javax.sql.DataSource/(osgi.jndi.service.name=jdbc/blogdb) | |
| query.password = SELECT PASSWORD FROM users WHERE USERNAME=? | |
| query.role = SELECT ROLE FROM roles WHERE USERNAME=? | |
| encryption.name = jasypt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <blueprint xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> | |
| <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"> </ext:property-placeholder> | |
| <jaas:config name="blog"> | |
| <jaas:module classname="org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule" flags="required"> | |
| datasource = osgi:javax.sql.DataSource/(osgi.jndi.service.name=jdbc/blogdb) | |
| query.password = SELECT PASSWORD FROM users WHERE USERNAME=? | |
| query.role = SELECT ROLE FROM roles WHERE USERNAME=? | |
| encryption.name = jasypt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class WicketJaasSession extends AuthenticatedWebSession { | |
| public static final String ROLES_GROUP_NAME = "ROLES"; | |
| public static final String ROLES_PREFIX = "ROLE_"; | |
| public static final String APPLICATION_POLICY_NAME = "blog"; | |
| private Subject subject; | |
| private Roles roles = new Roles(); | |
| @SuppressWarnings("deprecation") | |
| public WicketJaasSession(AuthenticatedWebApplication app, Request request) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class WicketApplication extends AuthenticatedWebApplication { | |
| /** | |
| * Constructor | |
| */ | |
| public WicketApplication() { | |
| } | |
| @Override | |
| protected void init() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @AuthorizeInstantiation("admin","manager") | |
| public class HomePage extends WebPage { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <dependency> | |
| <groupid>org.springframework</groupid> | |
| <artifactid>spring</artifactid> | |
| <version>2.5.6</version> | |
| </dependency> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package net.iocanel.blog.servicemix.management; | |
| import org.apache.servicemix.http.HttpEndpoint; | |
| import org.springframework.beans.factory.InitializingBean; | |
| import org.springframework.jmx.export.annotation.ManagedAttribute; | |
| import org.springframework.jmx.export.annotation.ManagedOperation; | |
| import org.springframework.jmx.export.annotation.ManagedResource; | |
| /** | |
| * A simple spring bean that gets injected an HttpEndpoint and exposes it to jmx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <beans xmlns:http="http://servicemix.apache.org/http/1.0" | |
| xmlns:person="http://servicemix.apache.org/samples/wsdl-first"> | |
| <http:endpoint defaultmep="http://www.w3.org/2004/08/wsdl/in-out" | |
| endpoint="soap" | |
| id="httpEndpoint" | |
| locationuri="http://0.0.0.0:8192/PersonService/" | |
| role="consumer" | |
| service="person:PersonService" | |
| soap="true" |