001/* 002 * DO NOT REMOVE COPYRIGHT NOTICES OR THIS HEADER. 003 * 004 * Copyright (c) 2012 ForgeRock Inc. All rights reserved. 005 * 006 * The contents of this file are subject to the terms 007 * of the Common Development and Distribution License 008 * (the License). You may not use this file except in 009 * compliance with the License. 010 * 011 * You can obtain a copy of the License at 012 * http://forgerock.org/license/CDDLv1.0.html 013 * See the License for the specific language governing 014 * permission and limitations under the License. 015 * 016 * When distributing Covered Code, include this CDDL 017 * Header Notice in each file and include the License file 018 * at http://forgerock.org/license/CDDLv1.0.html 019 * If applicable, add the following below the CDDL Header, 020 * with the fields enclosed by brackets [] replaced by 021 * your own identifying information: 022 * "Portions Copyrighted [2012] [ForgeRock Inc]" 023 */ 024/** 025 * "Portions Copyrighted 2012-2013 ForgeRock Inc" 026 * 027 */ 028 029package org.forgerock.openam.oauth2.provider; 030 031import org.forgerock.openam.oauth2.model.CoreToken; 032 033import java.util.Map; 034 035/** 036 * This class provides the functions that need to be implemented to create a response type for the authorize 037 * endpoint. 038 * 039 * @supported.all.api 040 */ 041public interface ResponseType { 042 /** 043 * Creates a token for a response type 044 * @param data The data needed to create the token 045 * @return the created token 046 */ 047 public CoreToken createToken(Map<String, Object> data); 048 049 /** 050 * Returns the location in the HTTP response the token should be returned 051 * @return A string of either FRAGMENT or QUERY 052 */ 053 public String getReturnLocation(); 054 055 /** 056 * The parameter in the URI to return the token as 057 */ 058 public String URIParamValue(); 059}