001/******************************************************************************* 002 * Copyright 2014 The MITRE Corporation 003 * and the MIT Kerberos and Internet Trust Consortium 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 ******************************************************************************/ 017package org.mitre.openid.connect.service; 018 019import java.io.IOException; 020 021import com.google.gson.stream.JsonReader; 022import com.google.gson.stream.JsonWriter; 023 024/** 025 * @author jricher 026 * @author arielak 027 */ 028public interface MITREidDataService { 029 030 /** 031 * Data member for 1.0 configuration 032 */ 033 public static final String MITREID_CONNECT_1_0 = "mitreid-connect-1.0"; 034 public static final String MITREID_CONNECT_1_1 = "mitreid-connect-1.1"; 035 036 // member names 037 public static final String REFRESHTOKENS = "refreshTokens"; 038 public static final String ACCESSTOKENS = "accessTokens"; 039 public static final String WHITELISTEDSITES = "whitelistedSites"; 040 public static final String BLACKLISTEDSITES = "blacklistedSites"; 041 public static final String AUTHENTICATIONHOLDERS = "authenticationHolders"; 042 public static final String GRANTS = "grants"; 043 public static final String CLIENTS = "clients"; 044 public static final String SYSTEMSCOPES = "systemScopes"; 045 046 /** 047 * Write out the current server state to the given JSON writer as a JSON object 048 * 049 * @param writer 050 * @throws IOException 051 */ 052 void exportData(JsonWriter writer) throws IOException; 053 054 /** 055 * Read in the current server state from the given JSON reader as a JSON object 056 * 057 * @param reader 058 */ 059 void importData(JsonReader reader) throws IOException; 060 061}