/** * Get a SubjectBean object. */ public SubjectBean getSubject(SubjectProviderParameters subjectProviderParameters) { // 1. Get the principal Principal principal = getPrincipal(subjectProviderParameters); if (principal == null) { LOG.fine("Error in getting principal"); throw new STSException("Error in getting principal", STSException.REQUEST_FAILED); } // 2. Create the SubjectBean using the principal SubjectBean subjectBean = createSubjectBean(principal, subjectProviderParameters); // 3. Create the KeyInfoBean and set it on the SubjectBean KeyInfoBean keyInfo = createKeyInfo(subjectProviderParameters); subjectBean.setKeyInfo(keyInfo); return subjectBean; }
/** * Get a SubjectBean object. */ public SubjectBean getSubject(SubjectProviderParameters subjectProviderParameters) { // 1. Get the principal Principal principal = getPrincipal(subjectProviderParameters); if (principal == null) { LOG.fine("Error in getting principal"); throw new STSException("Error in getting principal", STSException.REQUEST_FAILED); } // 2. Create the SubjectBean using the principal SubjectBean subjectBean = createSubjectBean(principal, subjectProviderParameters); // 3. Create the KeyInfoBean and set it on the SubjectBean KeyInfoBean keyInfo = createKeyInfo(subjectProviderParameters); subjectBean.setKeyInfo(keyInfo); return subjectBean; }
keyInfo.setEphemeralKey(secToken.getSecret()); subjectBean = new SubjectBean("", "", ""); subjectBean.setKeyInfo(keyInfo); } else { subjectBean = null;
keyInfo.setEphemeralKey(secToken.getSecret()); subjectBean = new SubjectBean("", "", ""); subjectBean.setKeyInfo(keyInfo); } else { subjectBean = null;
try { KeyInfoBean keyInfo = createKeyInfo(); subjectBean.setKeyInfo(keyInfo); } catch (Exception ex) { throw new IOException("Problem creating KeyInfo: " + ex.getMessage());
try { KeyInfoBean keyInfo = createKeyInfo(); subjectBean.setKeyInfo(keyInfo); } catch (Exception ex) { throw new IOException("Problem creating KeyInfo: " + ex.getMessage());
try { KeyInfoBean keyInfo = createKeyInfo(); subjectBean.setKeyInfo(keyInfo); } catch (Exception ex) { throw new IOException("Problem creating KeyInfo: " + ex.getMessage());
try { KeyInfoBean keyInfo = createKeyInfo(); subjectBean.setKeyInfo(keyInfo); } catch (Exception ex) { throw new IOException("Problem creating KeyInfo: " + ex.getMessage());
subjectBean.setKeyInfo(keyInfo); } catch (Exception ex) { throw new RuntimeException(ex);