Share via


Subject.GetPrivateCredentials(Class) Method

Definition

Return a Set of private credentials associated with this Subject that are instances or subclasses of the specified Class.

[Android.Runtime.Register("getPrivateCredentials", "(Ljava/lang/Class;)Ljava/util/Set;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public System.Collections.ICollection? GetPrivateCredentials (Java.Lang.Class? c);
[<Android.Runtime.Register("getPrivateCredentials", "(Ljava/lang/Class;)Ljava/util/Set;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
member this.GetPrivateCredentials : Java.Lang.Class -> System.Collections.ICollection

Parameters

c
Class

the returned Set of private credentials will all be instances of this class.

Returns

a Set of private credentials that are instances of the specified Class.

Attributes

Remarks

Return a Set of private credentials associated with this Subject that are instances or subclasses of the specified Class.

The caller must have permission to access all of the requested Credentials, or a SecurityException will be thrown.

The returned Set is not backed by this Subject's internal private Credential Set. A new Set is created and returned for each method invocation. Modifications to the returned Set will not affect the internal private Credential Set.

Java documentation for javax.security.auth.Subject.getPrivateCredentials(java.lang.Class<T>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to