Class WindowsSecurityContextImpl

    • Constructor Detail

      • WindowsSecurityContextImpl

        public WindowsSecurityContextImpl()
    • Method Detail

      • getCurrent

        public static IWindowsSecurityContext getCurrent​(String securityPackage,
                                                         String targetName)
        Get the current Windows security context for a given SSPI package.
        Parameters:
        securityPackage - SSPI package.
        targetName - The target of the context. The string contents are security-package specific.
        Returns:
        Windows security context.
      • initialize

        public void initialize​(com.sun.jna.platform.win32.Sspi.CtxtHandle continueCtx,
                               com.sun.jna.platform.win32.Sspi.SecBufferDesc continueToken,
                               String targetName)
        Description copied from interface: IWindowsSecurityContext
        Initialize the security context, continuing from a previous one.
        Specified by:
        initialize in interface IWindowsSecurityContext
        Parameters:
        continueCtx - Continue context.
        continueToken - Continue token.
        targetName - The target of the context. The string contents are security-package specific.
      • dispose

        public static boolean dispose​(com.sun.jna.platform.win32.Sspi.CtxtHandle ctx)
        Dispose a security context.
        Parameters:
        ctx - Security context.
        Returns:
        True if a context was disposed.
      • setPrincipalName

        public void setPrincipalName​(String value)
        Sets the principal name.
        Parameters:
        value - the new principal name
      • setCredentialsHandle

        public void setCredentialsHandle​(IWindowsCredentialsHandle handle)
        Sets the credentials handle.
        Parameters:
        handle - the new credentials handle
      • setToken

        public void setToken​(byte[] bytes)
        Sets the token.
        Parameters:
        bytes - the new token
      • setSecurityPackage

        public void setSecurityPackage​(String value)
        Sets the security package.
        Parameters:
        value - the new security package
      • setSecurityContext

        public void setSecurityContext​(com.sun.jna.platform.win32.Sspi.CtxtHandle phNewServerContext)
        Sets the security context.
        Parameters:
        phNewServerContext - the new security context
      • setContinue

        public void setContinue​(boolean b)
        Sets the continue.
        Parameters:
        b - the new continue