// Path: src/main/java/io/stalk/common/oauth/Profile.java
// public class Profile {
// 
//     private String name;
//     private String link;
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getLink() {
//         return link;
//     }
// 
//     public void setLink(String link) {
//         this.link = link;
//     }
// 
// 
// }


import io.stalk.common.oauth.Profile;
import java.util.HashMap;
import java.util.Map;

     * @param scope
     * @return Generated Request Token URL
     * @throws Exception
     */
    public static String getRequestTokenURL(final String requestTokenUrl,
                                            final String returnTo, final String realm,
                                            final String assocHandle, final String consumerURL,
                                            final String scope) throws Exception {
        Map<String, String> params = new HashMap<String, String>();
        params.putAll(requestTokenMap);
        params.put("openid.return_to", returnTo);
        params.put("openid.realm", realm);
        params.put("openid.assoc_handle", assocHandle);
        params.put("openid.ext2.consumer", consumerURL);
        if (scope != null) {
            params.put("openid.ext2.scope", scope);
        }
        String paramStr = HttpUtil.buildParams(params);
        char separator = requestTokenUrl.indexOf('?') == -1 ? '?' : '&';
        String url = requestTokenUrl + separator + paramStr;
        System.out.println("Request Token URL : " + url);
        return url;
    }

    /**
     * Parses the user info from request
     *
     * @param requestParams request parameters map
     * @return User Profile
     */

// Path: src/main/java/io/stalk/common/oauth/Profile.java
// public class Profile {
// 
//     private String name;
//     private String link;
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getLink() {
//         return link;
//     }
// 
//     public void setLink(String link) {
//         this.link = link;
//     }
// 
// 
// }


// Path: src/main/java/io/stalk/common/oauth/utils/OpenIdConsumer.java
import io.stalk.common.oauth.Profile;
import java.util.HashMap;
import java.util.Map;

     * @param scope
     * @return Generated Request Token URL
     * @throws Exception
     */
    public static String getRequestTokenURL(final String requestTokenUrl,
                                            final String returnTo, final String realm,
                                            final String assocHandle, final String consumerURL,
                                            final String scope) throws Exception {
        Map<String, String> params = new HashMap<String, String>();
        params.putAll(requestTokenMap);
        params.put("openid.return_to", returnTo);
        params.put("openid.realm", realm);
        params.put("openid.assoc_handle", assocHandle);
        params.put("openid.ext2.consumer", consumerURL);
        if (scope != null) {
            params.put("openid.ext2.scope", scope);
        }
        String paramStr = HttpUtil.buildParams(params);
        char separator = requestTokenUrl.indexOf('?') == -1 ? '?' : '&';
        String url = requestTokenUrl + separator + paramStr;
        System.out.println("Request Token URL : " + url);
        return url;
    }

    /**
     * Parses the user info from request
     *
     * @param requestParams request parameters map
     * @return User Profile
     */

    public static Profile getUserInfo(final Map<String, String> requestParams) {
