getClientScopes(boolean defaultScope, boolean filterByProtocol);
/**
* Returns a {@link ClientScopeModel} associated with this client.
*
*
This method is used as a fallback in order to let clients to resolve a {@code scope} dynamically which is not listed as default or optional scope when calling {@link #getClientScopes(boolean, boolean)}.
*
* @param scope the scope name
* @return the client scope
*/
default ClientScopeModel getDynamicClientScope(String scope) {
return null;
}
/**
* Time in seconds since epoc
*
* @return
*/
int getNotBefore();
void setNotBefore(int notBefore);
Map getRegisteredNodes();
/**
* 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);
// Clients are not displayed on consent screen by default
@Override
default boolean isDisplayOnConsentScreen() {
String displayVal = getAttribute(DISPLAY_ON_CONSENT_SCREEN);
return displayVal==null ? false : Boolean.parseBoolean(displayVal);
}
// Fallback to name or clientId if consentScreenText attribute is null
@Override
default String getConsentScreenText() {
String consentScreenText = ClientScopeModel.super.getConsentScreenText();
if (ObjectUtil.isBlank(consentScreenText)) {
consentScreenText = getClientId();
}
return consentScreenText;
}
}