Search in sources :

Example 1 with ApplicationRealm

use of com.stormpath.shiro.realm.ApplicationRealm in project vertx-auth by vert-x3.

the class StormpathTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    // Setup our shiro+stormpath+vertx integration
    File file = ((VertxInternal) vertx).resolveFile("stormpath.properties");
    ApiKey apiKey = ApiKeys.builder().setFileLocation(file.getAbsolutePath()).build();
    Client client = Clients.builder().setApiKey(apiKey).build();
    ApplicationRealm stormpathAppRealm = new ApplicationRealm();
    stormpathAppRealm.setClient(client);
    stormpathAppRealm.setApplicationRestUrl("https://api.stormpath.com/v1/applications/2oFtzixwgN0wYKt25euKpg");
    authProvider = ShiroAuth.create(vertx, stormpathAppRealm);
}
Also used : VertxInternal(io.vertx.core.impl.VertxInternal) ApiKey(com.stormpath.sdk.api.ApiKey) Client(com.stormpath.sdk.client.Client) File(java.io.File) ApplicationRealm(com.stormpath.shiro.realm.ApplicationRealm)

Aggregations

ApiKey (com.stormpath.sdk.api.ApiKey)1 Client (com.stormpath.sdk.client.Client)1 ApplicationRealm (com.stormpath.shiro.realm.ApplicationRealm)1 VertxInternal (io.vertx.core.impl.VertxInternal)1 File (java.io.File)1