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.String
assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static java.lang.String
assemblyShortName
Assembly name: mscorlibstatic java.lang.String
className
Qualified class name: System.Security.Principal.WindowsIdentitystatic JCType
classType
The 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 WindowsIdentity
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoWindowsIdentity
, a cast assert is made to check if types are compatible.ClaimsIdentity
Clone()
void
close()
void
Dispose()
SafeAccessTokenHandle
getAccessToken()
static WindowsIdentity
GetAnonymous()
static WindowsIdentity
GetCurrent()
static WindowsIdentity
GetCurrent(boolean ifImpersonating)
static WindowsIdentity
GetCurrent(TokenAccessLevels desiredAccess)
IdentityReferenceCollection
getGroups()
TokenImpersonationLevel
getImpersonationLevel()
boolean
getIsAnonymous()
boolean
getIsGuest()
boolean
getIsSystem()
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class TypeSecurityIdentifier
getOwner()
SecurityIdentifier
getUser()
WindowsImpersonationContext
Impersonate()
static void
RunImpersonated(SafeAccessTokenHandle safeAccessTokenHandle, Action action)
void
setJCOInstance(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.Throwable
Internal 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:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIDeserializationCallback
- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Specified by:
getJCOAssemblyName
in interfaceISerializable
- Overrides:
getJCOAssemblyName
in classClaimsIdentity
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIDeserializationCallback
- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Specified by:
getJCOClassName
in interfaceISerializable
- Overrides:
getJCOClassName
in classClaimsIdentity
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIDeserializationCallback
- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Specified by:
getJCOObjectName
in interfaceISerializable
- Overrides:
getJCOObjectName
in classClaimsIdentity
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIDeserializationCallback
- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Specified by:
getJCOInstance
in interfaceISerializable
- Overrides:
getJCOInstance
in classClaimsIdentity
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classClaimsIdentity
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIDeserializationCallback
- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Specified by:
getJCOType
in interfaceISerializable
- Overrides:
getJCOType
in classClaimsIdentity
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static WindowsIdentity cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoWindowsIdentity
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
WindowsIdentity
instance- 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:
Clone
in classClaimsIdentity
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
InvalidOperationException
ArgumentOutOfRangeException
KeyNotFoundException
OutOfMemoryException
FormatException
SecurityException
-
GetAnonymous
public static WindowsIdentity GetAnonymous() throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, ArgumentOutOfRangeException, KeyNotFoundException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
InvalidOperationException
ArgumentOutOfRangeException
KeyNotFoundException
-
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:
close
in 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.Throwable
ArgumentNullException
ArgumentException
InvalidOperationException
OutOfMemoryException
ArgumentOutOfRangeException
SecurityException
-
-