Package org.multibit.mbm.client.interfaces.rest.auth.hmac

Examples of org.multibit.mbm.client.interfaces.rest.auth.hmac.HmacServerAuthenticator


  protected User setUpHmacAuthenticator(User user) {

    UserReadService userReadService = mock(UserReadService.class);
    when(userReadService.getByApiKey(user.getApiKey())).thenReturn(Optional.of(user));

    HmacServerAuthenticator authenticator = new HmacServerAuthenticator();
    authenticator.setUserReadService(userReadService);

    addSingleton(new HmacServerRestrictedToProvider<User>(authenticator, "REST"));

    // Set the HMAC authentication user
    hmacUser = user;
View Full Code Here


    ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{
      "/spring/mbm-context.xml"
    });

    // Configure authenticator
    HmacServerAuthenticator hmacAuthenticator = context.getBean(HmacServerAuthenticator.class);
    CachingAuthenticator<HmacServerCredentials, User> cachingAuthenticator = CachingAuthenticator
      .wrap(hmacAuthenticator, CacheBuilderSpec.parse(configuration.getAuthenticationCachePolicy()));

    // Configure environment accordingly
    // Resources - admin (needs ROLE_ADMIN)
View Full Code Here

TOP

Related Classes of org.multibit.mbm.client.interfaces.rest.auth.hmac.HmacServerAuthenticator

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.