📄 credentialvaultservice.html
字号:
java.lang.String userId, char[] password, javax.portlet.PortletRequest portletRequest) throws <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></PRE><DL><DD>Sets a credential's user/password secret on a given slot.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>slotId</CODE> - The credential (slot) id.<DD><CODE>userId</CODE> - The credential's userId.<DD><CODE>password</CODE> - The credential's password.<DD><CODE>portletRequest</CODE> - The portlet request is used to determine parameters like the portlet id and user id.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></CODE> - if the credential secret is not of the type user/password or if the secret could not be set.</DL></DD></DL><HR><A NAME="createCredentialSlot(java.lang.String, com.ibm.portal.ObjectID, java.util.Map, java.util.Map, int, boolean, boolean, javax.portlet.PortletRequest)"><!-- --></A><H3>createCredentialSlot</H3><PRE>public <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialSlotConfig.html" title="interface in com.ibm.portal.portlet.service.credentialvault">CredentialSlotConfig</A> <B>createCredentialSlot</B>(java.lang.String resourceName, <A HREF="../../../../../../com/ibm/portal/ObjectID.html" title="interface in com.ibm.portal">ObjectID</A> segmentId, java.util.Map descriptions, java.util.Map keywords, int secretType, boolean active, boolean portletPrivate, javax.portlet.PortletRequest portletRequest) throws <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></PRE><DL><DD>Creates a new credential slot in the given vault segment. This method should be used by "ordinary" portlets, but not by "admin portlets", because this method only allows to create non system slots. The returned <code>CredentialSlotConfig</code> object holds the Slot ID of the newly generated slot. If one of the required parameters is null, an exception is thrown.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>resourceName</CODE> - Name of the resource. Must not be null.<DD><CODE>segmentId</CODE> - ObjectId of the segment that this slot is created in. Must not be null. Must be the ObjectID of a user mapped segment. As there is currently just one user mapped segment in the system, this parameter must contain the result of the method <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultService.html#getDefaultUserCredentialSegmentId()"><CODE>getDefaultUserCredentialSegmentId()</CODE></A>!<DD><CODE>descriptions</CODE> - The slot descriptions as a <code>Map</code>, keyed by their corresponding <code>Locale</code> objects Key: <code>Locale</code> (max length 64 characters) Value: <code>String</code> (max length 255 characters) The given map can be empty.<DD><CODE>keywords</CODE> - The slot keywords as a <code>Map</code>, keyed by their corresponding <code>Locale</code> objects Key: <code>Locale</code> (max length 64 characters). Can be null. Value: <code>String</code> (max length 255 characters) The given map can be empty.<DD><CODE>secretType</CODE> - The secrtet type identifier. Must not be null.<DD><CODE>active</CODE> - Flag whether this credential may only be returned in form of an active credential object (<code>true</code>) or both as active and passive credential objects (<code>false</code>)<DD><CODE>portletPrivate</CODE> - Flag whether the credential secret is portlet secific (<code>true</code>) or shared between all of a user's portlets (<code>false</code>).<DD><CODE>portletRequest</CODE> - The portlet request. Must not be null.<DT><B>Returns:</B><DD>CredentialSlot The credential slot configuration as <code>CredentialSlotConfig</code> object.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></CODE></DL></DD></DL><HR><A NAME="deleteCredentialSlot(java.lang.String)"><!-- --></A><H3>deleteCredentialSlot</H3><PRE>public void <B>deleteCredentialSlot</B>(java.lang.String slotName) throws <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></PRE><DL><DD>Deletes an existing credential slot. The parameter is the Slot ID that can be retrieved through <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialSlotConfig.html#getSlotId()"><CODE>CredentialSlotConfig#getSlotId()</CODE></A>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>slotName</CODE> - The credential (slot) id.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></CODE> - Is thrown if the credential slot could not be deleted or found.</DL></DD></DL><HR><A NAME="getDefaultUserCredentialSegmentId()"><!-- --></A><H3>getDefaultUserCredentialSegmentId</H3><PRE>public <A HREF="../../../../../../com/ibm/portal/ObjectID.html" title="interface in com.ibm.portal">ObjectID</A> <B>getDefaultUserCredentialSegmentId</B>() throws <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></PRE><DL><DD>Returns the ObjectID of the default user managed vault segment. Currently there is only one user managed segment, so this returns the ID of <i>the </i> user managed segment.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>ObjectID The ObjectID of the default user managed vault segment, or <code>null</code>, if no user managed vault segment is configured in the system.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></CODE> - Is thrown if the user segment could not be found.</DL></DD></DL><HR><A NAME="getAllCredentialSegments()"><!-- --></A><H3>getAllCredentialSegments</H3><PRE>public java.util.List <B>getAllCredentialSegments</B>() throws <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></PRE><DL><DD>Returns a List of all available Vault Segments.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>List of <code>VaultSegmentConfig</code> objects representing all vault segments.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></CODE> - Is thrown if the segments could not be retrieved.</DL></DD></DL><HR><A NAME="getCredential(java.lang.String, java.lang.String, java.util.Map, javax.portlet.PortletRequest)"><!-- --></A><H3>getCredential</H3><PRE>public <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/credentials/Credential.html" title="interface in com.ibm.portal.portlet.service.credentialvault.credentials">Credential</A> <B>getCredential</B>(java.lang.String slotId, java.lang.String type, java.util.Map config, javax.portlet.PortletRequest request) throws <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></PRE><DL><DD>Returns a specific credential from a specific slot. The type of the credential has to map the type of the stored credential. The parameter is the Slot ID that can be retrieved through <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialSlotConfig.html#getSlotId()"><CODE>CredentialSlotConfig#getSlotId()</CODE></A>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>slotId</CODE> - The credential (slot) id.<DD><CODE>type</CODE> - The credential type as specified in the credential type registry. Default credential type strings are defined as constants in the interface <code>CredentialTypes</code>.<DD><CODE>config</CODE> - The backend application specific configuration that is needed to initialize this credential. This is one part of the credential configuration. The credential vault service will usually add further information to this config from other sources: the user's secret from the actual credential store and the credential instance specific parameters from the portal's credential configuration. This parameter can be null.<DD><CODE>request</CODE> - The portlet request is used to determine information about the portlet.<DT><B>Returns:</B><DD>The retrieved credential object. The actual object will match the Credential Type.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></CODE> - if the credential could not been retrieved - either for technical or secuity reasons.<DD><CODE><A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialSecretNotSetException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialSecretNotSetException</A></CODE> - if the requested credential secret is not set (by the user or admin).</DL></DD></DL><HR><A NAME="getUserSubject(javax.portlet.PortletRequest)"><!-- --></A><H3>getUserSubject</H3><PRE>public javax.security.auth.Subject <B>getUserSubject</B>(javax.portlet.PortletRequest request) throws <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></PRE><DL><DD>Returns the user's JAAS Subject. The JAAS Subject is retrieved from the user object, so this method should only be called if a user is currently logged in. Otherwise a <code>PortletServiceException</code> is thrown. Note: The returned object is a transient credential.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>request</CODE> - The portlet request is used to determine the user.<DT><B>Returns:</B><DD>Subject The user's JAAS subject.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialVaultException.html" title="class in com.ibm.portal.portlet.service.credentialvault">CredentialVaultException</A></CODE> - if the subject could not been retrieved, e.g. because there is no logged in user.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/CredentialTypes.html" title="interface in com.ibm.portal.portlet.service.credentialvault"><B>PREV CLASS</B></A> <A HREF="../../../../../../com/ibm/portal/portlet/service/credentialvault/VaultSegmentConfig.html" title="interface in com.ibm.portal.portlet.service.credentialvault"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="CredentialVaultService.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -