privatecredentialpermission.html
来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 486 行 · 第 1/2 页
HTML
486 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Jan 17 03:51:37 PST 2002 -->
<TITLE>
Java 2 Platform EE v1.3: Class PrivateCredentialPermission
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<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"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </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="../../../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="../../../javax/security/auth/Policy.html"><B>PREV CLASS</B></A>
<A HREF="../../../javax/security/auth/Subject.html"><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="PrivateCredentialPermission.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.security.auth</FONT>
<BR>
Class PrivateCredentialPermission</H2>
<PRE>
java.lang.Object
|
+--java.security.Permission
|
+--<B>javax.security.auth.PrivateCredentialPermission</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.security.Guard, java.io.Serializable</DD>
</DL>
<HR>
<DL>
<DT>public final class <B>PrivateCredentialPermission</B><DT>extends java.security.Permission</DL>
<P>
This class is used to protect access to private Credentials
belonging to a particular <code>Subject</code>. The <code>Subject</code>
is represented by a Set of Principals.
<p> The target name of this <code>Permission</code> specifies
a Credential class name, and a Set of Principals.
The only valid value for this Permission's actions is, "read".
The target name must abide by the following syntax:
<pre>
CredentialClass {PrincipalClass "PrincipalName"}*
</pre>
For example, the following permission grants access to the
com.sun.PrivateCredential owned by Subjects which have
a com.sun.Principal with the name, "duke". Note that although
this example, as well as all the examples below, do not contain
Codebase, SignedBy, or Principal information in the grant statement
(for simplicity reasons), actual policy configurations should
specify that information when appropriate.
<pre>
grant {
permission javax.security.auth.PrivateCredentialPermission
"com.sun.PrivateCredential com.sun.Principal \"duke\"",
"read";
};
</pre>
If CredentialClass is "*", then access is granted to
all private Credentials belonging to the specified
<code>Subject</code>.
If "PrincipalName" is "*", then access is granted to the
specified Credential owned by any <code>Subject</code> that has the
specified <code>Principal</code> (the actual PrincipalName doesn't matter).
For example, the following grants access to the
a.b.Credential owned by any <code>Subject</code> that has
an a.b.Principal.
<pre>
grant {
permission javax.security.auth.PrivateCredentialPermission
"a.b.Credential a.b.Principal "*"",
"read";
};
</pre>
If both the PrincipalClass and "PrincipalName" are "*",
then access is granted to the specified Credential owned by
any <code>Subject</code>.
<p> In addition, the PrincipalClass/PrincipalName pairing may be repeated:
<pre>
grant {
permission javax.security.auth.PrivateCredentialPermission
"a.b.Credential a.b.Principal "duke" c.d.Principal "dukette"",
"read";
};
</pre>
The above grants access to the private Credential, "a.b.Credential",
belonging to a <code>Subject</code> with at least two associated Principals:
"a.b.Principal" with the name, "duke", and "c.d.Principal", with the name,
"dukette".
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../serialized-form.html#javax.security.auth.PrivateCredentialPermission">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/security/auth/PrivateCredentialPermission.html#PrivateCredentialPermission(java.lang.String, java.lang.String)">PrivateCredentialPermission</A></B>(java.lang.String name,
java.lang.String actions)</CODE>
<BR>
Creates a new <code>PrivateCredentialPermission</code>
with the specified <code>name</code>.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/PrivateCredentialPermission.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object obj)</CODE>
<BR>
Checks two <code>PrivateCredentialPermission</code> objects for
equality.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/PrivateCredentialPermission.html#getActions()">getActions</A></B>()</CODE>
<BR>
Returns the "canonical string representation" of the actions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/PrivateCredentialPermission.html#getCredentialClass()">getCredentialClass</A></B>()</CODE>
<BR>
Returns the Class name of the Credential associated with this
<code>PrivateCredentialPermission</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String[][]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/PrivateCredentialPermission.html#getPrincipals()">getPrincipals</A></B>()</CODE>
<BR>
Returns the <code>Principal</code> classes and names
associated with this <code>PrivateCredentialPermission</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/PrivateCredentialPermission.html#hashCode()">hashCode</A></B>()</CODE>
<BR>
Returns the hash code value for this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/PrivateCredentialPermission.html#implies(java.security.Permission)">implies</A></B>(java.security.Permission p)</CODE>
<BR>
Checks if this <code>PrivateCredentialPermission</code> implies
the specified <code>Permission</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.security.PermissionCollection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/security/auth/PrivateCredentialPermission.html#newPermissionCollection()">newPermissionCollection</A></B>()</CODE>
<BR>
Return a homogeneous collection of PrivateCredentialPermissions
in a <code>PermissionCollection</code>.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.security.Permission"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?