Package com.adobe.idp.um.api.infomodel

Examples of com.adobe.idp.um.api.infomodel.AuthResult



    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


    public boolean authorize(String login,String password) {
        initServiceClientFactory();
        initAuthenticationManagerServicesClient();

        try {
            AuthResult authResult = authClient.authenticate(login, password.getBytes("UTF-8"));
            return true;
        } catch (UMException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
View Full Code Here

TOP

Related Classes of com.adobe.idp.um.api.infomodel.AuthResult

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.