@@ -0,0 +1,2230 @@
+/*%0A * Copyright 2016 HERE Global B.V.%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %0A *     http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.here.account.oauth2.bo;%0A%0Aimport java.util.Collections;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0A/**%0A * One of the OAuth2.0 %0A * %3Ca href=%22https://tools.ietf.org/html/rfc6749#section-1.3%22%3EAuthorization Grant%3C/a%3E Request %0A * types supported by HERE.%0A * %0A * @author kmccrack%0A *%0A */%0Apublic abstract class AccessTokenRequest %7B%0A%0A    static final String GRANT_TYPE = %22grantType%22;%0A    %0A    private final String grantType;%0A    %0A    protected AccessTokenRequest(String grantType) %7B%0A        this.grantType = grantType;%0A    %7D%0A    %0A    public String getGrantType() %7B%0A        return grantType;%0A    %7D%0A    %0A    /**%0A     * Converts this request, into its JSON body representation.%0A     * %0A     * @return the JSON body, for use with application/json bodies%0A     */%0A    public abstract String toJson();%0A    %0A    /**%0A     * Converts this request, to its formParams Map representation.%0A     * %0A     * @return the formParams, for use with application/x-www-form-urlencoded bodies.%0A     */%0A    public abstract Map%3CString, List%3CString%3E%3E toFormParams();%0A%0A    /**%0A     * If the value is non-null, the name and singleton-List of the value.toString() is %0A     * added to the formParams Map.%0A     * %0A     * @param formParams the formParams Map, for use with application/x-www-form-urlencoded bodies%0A     * @param name the name of the form parameter%0A     * @param value the value of the form parameter%0A     */%0A    protected final void addFormParam(Map%3CString, List%3CString%3E%3E formParams, String name, Object value) %7B%0A        if (null != value) %7B%0A            formParams.put(name, Collections.singletonList(value.toString()));%0A        %7D%0A    %7D%0A%0A%7D%0A

refactor SignIn to AuthorizationObtainer. refactor AuthorizationRequest to AccessTokenRequest.