/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.amber.client; import java.io.Serializable; /** * The OAuth Consumer is defined in the {@link org.apache.amber.OAuth} Specification as * the client in one of the legs during an authorisation or authentication. * * @version $Id$ */ public interface OAuthConsumer extends Serializable { /** * The name field is a convenient reference to the Consumer and SHOULD match * the string used during the Provider registration process * * @return name */ String getName(); /** * @param name the name to set */ void setName(String name); /** * The key field contains the key string assigned to the Consumer by the * Provider, during registration. * * @return the key */ String getKey(); /** * @param key the key to set */ void setKey(String key); /** * @return the secret */ String getSecret(); /** * The secret field contains the unique secret string generated by the * Provider, during registration. * * @param secret the secret to set */ void setSecret(String secret); /** * The callback field contains the HTTP URL that the Provider will redirect * the User to during the authentication / authorisation process. * * It MUST be set to the "OUT OF BAND" value "oob" if * the response can't be sent via an HTTP redirect. * * @return the callback */ String getCallback(); /** * @param callback the callback to set */ void setCallback(String callback); }