@@ -0,0 +1,1987 @@
+package com.autonomy.abc.config;%0A%0Aimport com.hp.autonomy.frontend.selenium.login.AuthProvider;%0Aimport com.hp.autonomy.frontend.selenium.sso.*;%0A%0Aimport java.util.Map;%0A%0Apublic enum HSOAuthFactory %7B%0A    API_KEY() %7B%0A        @Override%0A        AuthProvider getProvider(Map%3CString, Object%3E map) %7B%0A            return new ApiKey(map.get(%22apiKey%22).toString());%0A        %7D%0A    %7D,%0A    FACEBOOK() %7B%0A        @Override%0A        AuthProvider getProvider(Map%3CString, Object%3E map) %7B%0A            return new FacebookAuth(map.get(%22email%22).toString(), map.get(%22password%22).toString());%0A        %7D%0A    %7D,%0A    GOOGLE() %7B%0A        @Override%0A        AuthProvider getProvider(Map%3CString, Object%3E map) %7B%0A            return new GoogleAuth(map.get(%22email%22).toString(), map.get(%22password%22).toString());%0A        %7D%0A    %7D,%0A    HP_PASSPORT() %7B%0A        @Override%0A        AuthProvider getProvider(Map%3CString, Object%3E map) %7B%0A            return new HPPassport(map.get(%22username%22).toString(), map.get(%22password%22).toString());%0A        %7D%0A    %7D,%0A    OPEN_ID() %7B%0A        @Override%0A        AuthProvider getProvider(Map%3CString, Object%3E map) %7B%0A            return new OpenID(map.get(%22url%22).toString());%0A        %7D%0A    %7D,%0A    TWITTER() %7B%0A        @Override%0A        AuthProvider getProvider(Map%3CString, Object%3E map) %7B%0A            return new TwitterAuth(map.get(%22username%22).toString(), map.get(%22password%22).toString());%0A        %7D%0A    %7D,%0A    YAHOO() %7B%0A        @Override%0A        AuthProvider getProvider(Map%3CString, Object%3E map) %7B%0A            return new YahooAuth(map.get(%22username%22).toString(), map.get(%22password%22).toString());%0A        %7D%0A    %7D;%0A%0A    private static HSOAuthFactory getFactory(String string) %7B%0A        return HSOAuthFactory.valueOf(string.toUpperCase().replace(' ', '_'));%0A    %7D%0A%0A    abstract AuthProvider getProvider(Map%3CString, Object%3E map);%0A%0A    public static AuthProvider fromMap(Map%3CString, Object%3E map) %7B%0A        HSOAuthFactory factory = getFactory(map.get(%22type%22).toString());%0A        return factory.getProvider(map);%0A    %7D%0A%7D%0A

Add HSOAuthFactory to create an AuthProvider from a Map<String, Object>