2016-02-03 10:20:22 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
|
|
* and other contributors as indicated by the @author tags.
|
|
|
|
*
|
|
|
|
* Licensed 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.
|
|
|
|
*/
|
|
|
|
|
2015-07-17 11:45:43 +00:00
|
|
|
package org.keycloak.models;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
|
|
* @version $Revision: 1 $
|
|
|
|
*/
|
2015-12-18 22:15:27 +00:00
|
|
|
public interface ClientModel extends RoleContainerModel, ProtocolMapperContainerModel, ScopeContainerModel {
|
2015-07-17 11:45:43 +00:00
|
|
|
|
|
|
|
// COMMON ATTRIBUTES
|
|
|
|
|
|
|
|
String PRIVATE_KEY = "privateKey";
|
|
|
|
String PUBLIC_KEY = "publicKey";
|
|
|
|
String X509CERTIFICATE = "X509Certificate";
|
|
|
|
|
|
|
|
void updateClient();
|
|
|
|
|
|
|
|
String getId();
|
|
|
|
|
|
|
|
String getClientId();
|
|
|
|
|
|
|
|
void setClientId(String clientId);
|
|
|
|
|
|
|
|
String getName();
|
|
|
|
|
|
|
|
void setName(String name);
|
|
|
|
|
2015-10-14 21:14:19 +00:00
|
|
|
String getDescription();
|
|
|
|
|
|
|
|
void setDescription(String description);
|
|
|
|
|
2015-07-17 11:45:43 +00:00
|
|
|
boolean isEnabled();
|
|
|
|
|
|
|
|
void setEnabled(boolean enabled);
|
|
|
|
|
|
|
|
boolean isSurrogateAuthRequired();
|
|
|
|
|
|
|
|
void setSurrogateAuthRequired(boolean surrogateAuthRequired);
|
|
|
|
|
|
|
|
Set<String> getWebOrigins();
|
|
|
|
|
|
|
|
void setWebOrigins(Set<String> webOrigins);
|
|
|
|
|
|
|
|
void addWebOrigin(String webOrigin);
|
|
|
|
|
|
|
|
void removeWebOrigin(String webOrigin);
|
|
|
|
|
|
|
|
Set<String> getRedirectUris();
|
|
|
|
|
|
|
|
void setRedirectUris(Set<String> redirectUris);
|
|
|
|
|
|
|
|
void addRedirectUri(String redirectUri);
|
|
|
|
|
|
|
|
void removeRedirectUri(String redirectUri);
|
|
|
|
|
|
|
|
String getManagementUrl();
|
|
|
|
|
|
|
|
void setManagementUrl(String url);
|
|
|
|
|
2015-09-22 12:35:37 +00:00
|
|
|
String getRootUrl();
|
|
|
|
|
|
|
|
void setRootUrl(String url);
|
|
|
|
|
2015-07-17 11:45:43 +00:00
|
|
|
String getBaseUrl();
|
|
|
|
|
|
|
|
void setBaseUrl(String url);
|
|
|
|
|
|
|
|
|
|
|
|
boolean isBearerOnly();
|
|
|
|
void setBearerOnly(boolean only);
|
|
|
|
|
|
|
|
int getNodeReRegistrationTimeout();
|
|
|
|
|
|
|
|
void setNodeReRegistrationTimeout(int timeout);
|
|
|
|
|
2015-09-03 22:09:54 +00:00
|
|
|
String getClientAuthenticatorType();
|
|
|
|
void setClientAuthenticatorType(String clientAuthenticatorType);
|
|
|
|
|
2015-07-17 11:45:43 +00:00
|
|
|
boolean validateSecret(String secret);
|
|
|
|
String getSecret();
|
|
|
|
public void setSecret(String secret);
|
|
|
|
|
2015-11-17 19:35:09 +00:00
|
|
|
String getRegistrationToken();
|
|
|
|
void setRegistrationToken(String registrationToken);
|
2015-11-11 13:31:39 +00:00
|
|
|
|
2015-07-17 11:45:43 +00:00
|
|
|
String getProtocol();
|
|
|
|
void setProtocol(String protocol);
|
|
|
|
|
|
|
|
void setAttribute(String name, String value);
|
|
|
|
void removeAttribute(String name);
|
|
|
|
String getAttribute(String name);
|
|
|
|
Map<String, String> getAttributes();
|
|
|
|
|
|
|
|
boolean isFrontchannelLogout();
|
|
|
|
void setFrontchannelLogout(boolean flag);
|
|
|
|
|
|
|
|
|
|
|
|
boolean isPublicClient();
|
|
|
|
void setPublicClient(boolean flag);
|
|
|
|
|
|
|
|
boolean isConsentRequired();
|
|
|
|
void setConsentRequired(boolean consentRequired);
|
|
|
|
|
2015-11-23 13:26:47 +00:00
|
|
|
boolean isStandardFlowEnabled();
|
|
|
|
void setStandardFlowEnabled(boolean standardFlowEnabled);
|
|
|
|
|
|
|
|
boolean isImplicitFlowEnabled();
|
|
|
|
void setImplicitFlowEnabled(boolean implicitFlowEnabled);
|
|
|
|
|
|
|
|
boolean isDirectAccessGrantsEnabled();
|
|
|
|
void setDirectAccessGrantsEnabled(boolean directAccessGrantsEnabled);
|
|
|
|
|
2015-07-18 20:28:38 +00:00
|
|
|
boolean isServiceAccountsEnabled();
|
|
|
|
void setServiceAccountsEnabled(boolean serviceAccountsEnabled);
|
|
|
|
|
2015-07-17 11:45:43 +00:00
|
|
|
RealmModel getRealm();
|
|
|
|
|
2015-12-11 15:31:42 +00:00
|
|
|
ClientTemplateModel getClientTemplate();
|
|
|
|
void setClientTemplate(ClientTemplateModel template);
|
2015-12-18 22:15:27 +00:00
|
|
|
boolean useTemplateScope();
|
|
|
|
void setUseTemplateScope(boolean flag);
|
|
|
|
boolean useTemplateMappers();
|
|
|
|
void setUseTemplateMappers(boolean flag);
|
|
|
|
boolean useTemplateConfig();
|
|
|
|
void setUseTemplateConfig(boolean flag);
|
2015-12-11 15:31:42 +00:00
|
|
|
|
2015-07-17 11:45:43 +00:00
|
|
|
/**
|
|
|
|
* Time in seconds since epoc
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
int getNotBefore();
|
|
|
|
|
|
|
|
void setNotBefore(int notBefore);
|
|
|
|
|
2015-12-11 15:31:42 +00:00
|
|
|
Map<String, Integer> getRegisteredNodes();
|
2015-07-17 11:45:43 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Register node or just update the 'lastReRegistration' time if this node is already registered
|
|
|
|
*
|
|
|
|
* @param nodeHost
|
|
|
|
* @param registrationTime
|
|
|
|
*/
|
|
|
|
void registerNode(String nodeHost, int registrationTime);
|
|
|
|
|
|
|
|
void unregisterNode(String nodeHost);
|
|
|
|
}
|