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, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089..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: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static java.lang.StringassemblyShortNameAssembly name: mscorlibstatic 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(java.lang.String sUserPrincipalName, java.lang.String type)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()WindowsImpersonationContextImpersonate()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: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: mscorlib- 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, InvalidOperationException, FormatException, SerializationException, ArgumentException, ArgumentOutOfRangeException, SecurityException
-
WindowsIdentity
public WindowsIdentity(java.lang.String sUserPrincipalName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, ArgumentOutOfRangeException, KeyNotFoundException, OutOfMemoryException, ObjectDisposedException, AbandonedMutexException, UnauthorizedAccessException, FormatException, PrivilegeNotHeldException, SecurityException
-
WindowsIdentity
public WindowsIdentity(java.lang.String sUserPrincipalName, java.lang.String type) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, ArgumentOutOfRangeException, KeyNotFoundException, OutOfMemoryException, ObjectDisposedException, AbandonedMutexException, UnauthorizedAccessException, FormatException, PrivilegeNotHeldException, SecurityException
-
-
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, ArgumentNullException, ArgumentException, InvalidOperationException, ArgumentOutOfRangeException, KeyNotFoundException, OutOfMemoryException, FormatException, SecurityException
- Overrides:
Clonein classClaimsIdentity- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionKeyNotFoundExceptionOutOfMemoryExceptionFormatExceptionSecurityException
-
GetAnonymous
public static WindowsIdentity GetAnonymous() throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, ArgumentOutOfRangeException, KeyNotFoundException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionKeyNotFoundException
-
GetCurrent
public static WindowsIdentity GetCurrent() throws java.lang.Throwable, ArgumentOutOfRangeException, OutOfMemoryException, ArgumentNullException, SecurityException, ArgumentException, InvalidOperationException, KeyNotFoundException
-
GetCurrent
public static WindowsIdentity GetCurrent(boolean ifImpersonating) throws java.lang.Throwable, ArgumentOutOfRangeException, OutOfMemoryException, ArgumentNullException, SecurityException, ArgumentException, InvalidOperationException, KeyNotFoundException
-
GetCurrent
public static WindowsIdentity GetCurrent(TokenAccessLevels desiredAccess) throws java.lang.Throwable, ArgumentOutOfRangeException, OutOfMemoryException, ArgumentNullException, SecurityException, ArgumentException, InvalidOperationException, KeyNotFoundException
-
Impersonate
public WindowsImpersonationContext Impersonate() throws java.lang.Throwable, InvalidOperationException, ArgumentOutOfRangeException, OutOfMemoryException, ArgumentNullException, SecurityException, ArgumentException, NullReferenceException
-
Dispose
public void Dispose() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
RunImpersonated
public static void RunImpersonated(SafeAccessTokenHandle safeAccessTokenHandle, Action action) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, ArgumentOutOfRangeException, KeyNotFoundException, OutOfMemoryException, SecurityException, NullReferenceException
-
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, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, ArgumentOutOfRangeException, FormatException, OutOfMemoryException, SecurityException, AccessViolationException
-
getIsGuest
public boolean getIsGuest() throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, ArgumentOutOfRangeException, FormatException, OutOfMemoryException, SecurityException
-
getIsSystem
public boolean getIsSystem() throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, ArgumentOutOfRangeException, FormatException, OutOfMemoryException, SecurityException, AccessViolationException
-
getAccessToken
public SafeAccessTokenHandle getAccessToken() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getGroups
public IdentityReferenceCollection getGroups() throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentNullException, ArgumentException, InvalidOperationException, OutOfMemoryException, SecurityException, AccessViolationException
-
getOwner
public SecurityIdentifier getOwner() throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, OutOfMemoryException, ArgumentOutOfRangeException, SecurityException, AccessViolationException
-
getUser
public SecurityIdentifier getUser() throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, OutOfMemoryException, ArgumentOutOfRangeException, SecurityException, AccessViolationException
-
getImpersonationLevel
public TokenImpersonationLevel getImpersonationLevel() throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, OutOfMemoryException, ArgumentOutOfRangeException, SecurityException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionInvalidOperationExceptionOutOfMemoryExceptionArgumentOutOfRangeExceptionSecurityException
-
-