Package com.adobe.idp

Examples of com.adobe.idp.Context


    public static void impersonateUserAndSetClientFactory(String canonicalName, String domainName, ServiceClientFactory serviceClientFactory,ResourceManager resourceManager)
            throws UMException {
        AuthenticationManagerServiceClient authClient = new AuthenticationManagerServiceClient(serviceClientFactory);
        AuthResult authResultAdmin = authClient
                .authenticate(resourceManager.getPropValue(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME), resourceManager.getPropValue(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD).getBytes());
        Context context = new Context();
        context.initPrincipal(authResultAdmin);
        AuthResult authResult = authClient.getAuthResultOnBehalfOfUser(
                canonicalName, domainName, context);

        Context impersonateContext = new Context();
        impersonateContext.initPrincipal(authResult);
        serviceClientFactory.setContext(impersonateContext);
    }
View Full Code Here

TOP

Related Classes of com.adobe.idp.Context

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.