mitreid-connect
静的公開変数類 | 限定公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.mitre.openid.connect.view.ClientEntityViewForUsers クラス
org.mitre.openid.connect.view.ClientEntityViewForUsers の継承関係図
Inheritance graph
org.mitre.openid.connect.view.ClientEntityViewForUsers 連携図
Collaboration graph

静的公開変数類

static final String VIEWNAME = "clientEntityViewUsers"
 

限定公開メンバ関数

ExclusionStrategy getExclusionStrategy ()
 
void renderMergedOutputModel (Map< String, Object > model, HttpServletRequest request, HttpServletResponse response)
 

非公開変数類

Set< String > whitelistedFields = ImmutableSet.of("clientName", "clientId", "id", "clientDescription", "scope", "logoUri")
 

詳解

View bean for field-limited view of client entity, for regular users.

参照
AbstractClientEntityView
ClientEntityViewForAdmins
著者
jricher

関数詳解

◆ getExclusionStrategy()

ExclusionStrategy org.mitre.openid.connect.view.ClientEntityViewForUsers.getExclusionStrategy ( )
inlineprotected
52  {
53  return new ExclusionStrategy() {
54 
55  @Override
56  public boolean shouldSkipField(FieldAttributes f) {
57  // whitelist the handful of fields that are good
58  if (whitelistedFields.contains(f.getName())) {
59  return false;
60  } else {
61  return true;
62  }
63  }
64 
65  @Override
66  public boolean shouldSkipClass(Class<?> clazz) {
67  // skip the JPA binding wrapper
68  if (clazz.equals(BeanPropertyBindingResult.class)) {
69  return true;
70  }
71  return false;
72  }
73 
74  };
75  }
Set< String > whitelistedFields
Definition: ClientEntityViewForUsers.java:44

◆ renderMergedOutputModel()

void org.mitre.openid.connect.view.AbstractClientEntityView.renderMergedOutputModel ( Map< String, Object >  model,
HttpServletRequest  request,
HttpServletResponse  response 
)
inlineprotectedinherited
145  {
146 
147  response.setContentType(MediaType.APPLICATION_JSON_VALUE);
148 
149 
150  HttpStatus code = (HttpStatus) model.get(HttpCodeView.CODE);
151  if (code == null) {
152  code = HttpStatus.OK; // default to 200
153  }
154 
155  response.setStatus(code.value());
156 
157  try {
158 
159  Writer out = response.getWriter();
160  Object obj = model.get(JsonEntityView.ENTITY);
161  gson.toJson(obj, out);
162 
163  } catch (IOException e) {
164 
165  logger.error("IOException in JsonEntityView.java: ", e);
166 
167  }
168  }
static final Logger logger
Definition: AbstractClientEntityView.java:66
Gson gson
Definition: AbstractClientEntityView.java:70

メンバ詳解

◆ VIEWNAME

final String org.mitre.openid.connect.view.ClientEntityViewForUsers.VIEWNAME = "clientEntityViewUsers"
static

◆ whitelistedFields

Set<String> org.mitre.openid.connect.view.ClientEntityViewForUsers.whitelistedFields = ImmutableSet.of("clientName", "clientId", "id", "clientDescription", "scope", "logoUri")
private

このクラス詳解は次のファイルから抽出されました: