Package system.security.principal
Class WindowsIdentity
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.security.claims.ClaimsIdentity
-
- system.security.principal.WindowsIdentity
-
- All Implemented Interfaces:
java.lang.AutoCloseable,IJCOBridgeReflected,IDeserializationCallback,ISerializable
public class WindowsIdentity extends ClaimsIdentity implements ISerializable, IDeserializationCallback, java.lang.AutoCloseable
The base .NET class managing System.Security.Principal.WindowsIdentity, System.Security.Principal.Windows, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Security.Principal.WindowsIdentity
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringassemblyFullNameFully assembly qualified name: System.Security.Principal.Windows, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3astatic java.lang.StringassemblyShortNameAssembly name: System.Security.Principal.Windowsstatic java.lang.StringclassNameQualified class name: System.Security.Principal.WindowsIdentitystatic JCTypeclassTypeThe type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description WindowsIdentity()WindowsIdentity(java.lang.Object instance)Internal constructor.WindowsIdentity(java.lang.String sUserPrincipalName)WindowsIdentity(SerializationInfo info, StreamingContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WindowsIdentitycast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoWindowsIdentity, a cast assert is made to check if types are compatible.ClaimsIdentityClone()voidclose()voidDispose()SafeAccessTokenHandlegetAccessToken()static WindowsIdentityGetAnonymous()static WindowsIdentityGetCurrent()static WindowsIdentityGetCurrent(boolean ifImpersonating)static WindowsIdentityGetCurrent(TokenAccessLevels desiredAccess)IdentityReferenceCollectiongetGroups()TokenImpersonationLevelgetImpersonationLevel()booleangetIsAnonymous()booleangetIsGuest()booleangetIsSystem()java.lang.StringgetJCOAssemblyName()Returns the reflected Assembly namejava.lang.StringgetJCOClassName()Returns the reflected Class namejava.lang.ObjectgetJCOInstance()Returns the instantiated classjava.lang.StringgetJCOObjectName()Returns the reflected Class name used to build the objectJCTypegetJCOType()Returns the instantiated class TypeSecurityIdentifiergetOwner()SecurityIdentifiergetUser()static voidRunImpersonated(SafeAccessTokenHandle safeAccessTokenHandle, Action action)voidsetJCOInstance(JCObject instance)-
Methods inherited from class system.security.claims.ClaimsIdentity
AddClaim, FindFirst, getActor, getAuthenticationType, getBootstrapContext, getIsAuthenticated, getLabel, getName, getNameClaimType, getRoleClaimType, HasClaim, RemoveClaim, setActor, setBootstrapContext, setLabel, TryRemoveClaim, WriteTo
-
Methods inherited from class org.mases.jcobridge.netreflection.NetObject
Equals, Equals, GetHashCode, GetType, hashCode, toString, ToString
-
Methods inherited from interface system.runtime.serialization.IDeserializationCallback
OnDeserialization
-
Methods inherited from interface system.runtime.serialization.ISerializable
GetObjectData
-
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Security.Principal.Windows, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Security.Principal.Windows- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Security.Principal.WindowsIdentity- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WindowsIdentity
public WindowsIdentity(java.lang.Object instance) throws java.lang.ThrowableInternal constructor. Use with caution- Throws:
java.lang.Throwable
-
WindowsIdentity
public WindowsIdentity() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
WindowsIdentity
public WindowsIdentity(SerializationInfo info, StreamingContext context) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, IndexOutOfRangeException, RankException, ArrayTypeMismatchException
-
WindowsIdentity
public WindowsIdentity(java.lang.String sUserPrincipalName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, NotSupportedException, InvalidOperationException, ObjectDisposedException, IndexOutOfRangeException, RankException, ArrayTypeMismatchException, MissingMethodException, TargetInvocationException, FormatException, SecurityException, OutOfMemoryException- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionNotSupportedExceptionInvalidOperationExceptionObjectDisposedExceptionIndexOutOfRangeExceptionRankExceptionArrayTypeMismatchExceptionMissingMethodExceptionTargetInvocationExceptionFormatExceptionSecurityExceptionOutOfMemoryException
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Assembly name- Specified by:
getJCOAssemblyNamein interfaceIDeserializationCallback- Specified by:
getJCOAssemblyNamein interfaceIJCOBridgeReflected- Specified by:
getJCOAssemblyNamein interfaceISerializable- Overrides:
getJCOAssemblyNamein classClaimsIdentity- Returns:
- A
Stringrepresenting the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name- Specified by:
getJCOClassNamein interfaceIDeserializationCallback- Specified by:
getJCOClassNamein interfaceIJCOBridgeReflected- Specified by:
getJCOClassNamein interfaceISerializable- Overrides:
getJCOClassNamein classClaimsIdentity- Returns:
- A
Stringrepresenting the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name used to build the object- Specified by:
getJCOObjectNamein interfaceIDeserializationCallback- Specified by:
getJCOObjectNamein interfaceIJCOBridgeReflected- Specified by:
getJCOObjectNamein interfaceISerializable- Overrides:
getJCOObjectNamein classClaimsIdentity- Returns:
- A
Stringrepresenting the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class- Specified by:
getJCOInstancein interfaceIDeserializationCallback- Specified by:
getJCOInstancein interfaceIJCOBridgeReflected- Specified by:
getJCOInstancein interfaceISerializable- Overrides:
getJCOInstancein classClaimsIdentity- Returns:
- An
Objectrepresenting the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstancein classClaimsIdentity
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class Type- Specified by:
getJCOTypein interfaceIDeserializationCallback- Specified by:
getJCOTypein interfaceIJCOBridgeReflected- Specified by:
getJCOTypein interfaceISerializable- Overrides:
getJCOTypein classClaimsIdentity- Returns:
- A
JCTyperepresenting the CLR Type of the instantiated Class
-
cast
public static WindowsIdentity cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoWindowsIdentity, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
WindowsIdentityinstance- Throws:
java.lang.Throwable- in case of error during cast operation
-
Clone
public ClaimsIdentity Clone() throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, RankException, ArrayTypeMismatchException, PlatformNotSupportedException, ObjectDisposedException, MissingMethodException, TargetInvocationException, SecurityException
- Overrides:
Clonein classClaimsIdentity- Throws:
java.lang.ThrowableNotSupportedExceptionArgumentExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionRankExceptionArrayTypeMismatchExceptionPlatformNotSupportedExceptionObjectDisposedExceptionMissingMethodExceptionTargetInvocationExceptionSecurityException
-
GetAnonymous
public static WindowsIdentity GetAnonymous() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, IndexOutOfRangeException, RankException, ArrayTypeMismatchException
-
GetCurrent
public static WindowsIdentity GetCurrent() throws java.lang.Throwable, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, ArrayTypeMismatchException, NotSupportedException, InvalidOperationException, FormatException, SecurityException, ObjectDisposedException
- Throws:
java.lang.ThrowableMissingMethodExceptionTargetInvocationExceptionPlatformNotSupportedExceptionArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionArrayTypeMismatchExceptionNotSupportedExceptionInvalidOperationExceptionFormatExceptionSecurityExceptionObjectDisposedException
-
GetCurrent
public static WindowsIdentity GetCurrent(boolean ifImpersonating) throws java.lang.Throwable, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, ArrayTypeMismatchException, NotSupportedException, InvalidOperationException, FormatException, SecurityException, ObjectDisposedException
- Throws:
java.lang.ThrowableMissingMethodExceptionTargetInvocationExceptionPlatformNotSupportedExceptionArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionArrayTypeMismatchExceptionNotSupportedExceptionInvalidOperationExceptionFormatExceptionSecurityExceptionObjectDisposedException
-
GetCurrent
public static WindowsIdentity GetCurrent(TokenAccessLevels desiredAccess) throws java.lang.Throwable, MissingMethodException, TargetInvocationException, PlatformNotSupportedException, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, ArrayTypeMismatchException, NotSupportedException, InvalidOperationException, FormatException, SecurityException, ObjectDisposedException
- Throws:
java.lang.ThrowableMissingMethodExceptionTargetInvocationExceptionPlatformNotSupportedExceptionArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionArrayTypeMismatchExceptionNotSupportedExceptionInvalidOperationExceptionFormatExceptionSecurityExceptionObjectDisposedException
-
Dispose
public void Dispose() throws java.lang.Throwable, ObjectDisposedException, ArgumentNullException- Throws:
java.lang.ThrowableObjectDisposedExceptionArgumentNullException
-
RunImpersonated
public static void RunImpersonated(SafeAccessTokenHandle safeAccessTokenHandle, Action action) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, MissingMethodException, TargetInvocationException, SecurityException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionMissingMethodExceptionTargetInvocationExceptionSecurityException
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
getIsAnonymous
public boolean getIsAnonymous() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, NotSupportedException, OutOfMemoryException, IndexOutOfRangeException, FormatException, SecurityException, AccessViolationException- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionNotSupportedExceptionOutOfMemoryExceptionIndexOutOfRangeExceptionFormatExceptionSecurityExceptionAccessViolationException
-
getIsGuest
public boolean getIsGuest() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, NotSupportedException, OutOfMemoryException, SecurityException, MissingMethodException, TargetInvocationException- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionNotSupportedExceptionOutOfMemoryExceptionSecurityExceptionMissingMethodExceptionTargetInvocationException
-
getIsSystem
public boolean getIsSystem() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, NotSupportedException, OutOfMemoryException, IndexOutOfRangeException, FormatException, SecurityException, AccessViolationException- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionNotSupportedExceptionOutOfMemoryExceptionIndexOutOfRangeExceptionFormatExceptionSecurityExceptionAccessViolationException
-
getAccessToken
public SafeAccessTokenHandle getAccessToken() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getGroups
public IdentityReferenceCollection getGroups() throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, ObjectDisposedException, OutOfMemoryException, ArgumentException, IndexOutOfRangeException, InvalidOperationException, FormatException, SecurityException, CultureNotFoundException, ArrayTypeMismatchException, AccessViolationException, RankException, InvalidCastException, NullReferenceException, NotSupportedException
- Throws:
java.lang.ThrowableArgumentOutOfRangeExceptionArgumentNullExceptionPlatformNotSupportedExceptionObjectDisposedExceptionOutOfMemoryExceptionArgumentExceptionIndexOutOfRangeExceptionInvalidOperationExceptionFormatExceptionSecurityExceptionCultureNotFoundExceptionArrayTypeMismatchExceptionAccessViolationExceptionRankExceptionInvalidCastExceptionNullReferenceExceptionNotSupportedException
-
getOwner
public SecurityIdentifier getOwner() throws java.lang.Throwable, ArgumentNullException, PlatformNotSupportedException, ObjectDisposedException, OutOfMemoryException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException, ArrayTypeMismatchException, InvalidOperationException, FormatException, SecurityException, CultureNotFoundException, NotSupportedException, AccessViolationException
- Throws:
java.lang.ThrowableArgumentNullExceptionPlatformNotSupportedExceptionObjectDisposedExceptionOutOfMemoryExceptionArgumentOutOfRangeExceptionArgumentExceptionIndexOutOfRangeExceptionArrayTypeMismatchExceptionInvalidOperationExceptionFormatExceptionSecurityExceptionCultureNotFoundExceptionNotSupportedExceptionAccessViolationException
-
getUser
public SecurityIdentifier getUser() throws java.lang.Throwable, ArgumentNullException, PlatformNotSupportedException, ObjectDisposedException, OutOfMemoryException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException, ArrayTypeMismatchException, InvalidOperationException, FormatException, SecurityException, CultureNotFoundException, NotSupportedException, AccessViolationException
- Throws:
java.lang.ThrowableArgumentNullExceptionPlatformNotSupportedExceptionObjectDisposedExceptionOutOfMemoryExceptionArgumentOutOfRangeExceptionArgumentExceptionIndexOutOfRangeExceptionArrayTypeMismatchExceptionInvalidOperationExceptionFormatExceptionSecurityExceptionCultureNotFoundExceptionNotSupportedExceptionAccessViolationException
-
getImpersonationLevel
public TokenImpersonationLevel getImpersonationLevel() throws java.lang.Throwable, PlatformNotSupportedException, ObjectDisposedException, OutOfMemoryException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException, FormatException, InvalidOperationException, SecurityException, CultureNotFoundException
-
-