Interface ISSOCallback


  • public interface ISSOCallback
    Defines the Perforce Single Sign On (SSO) callback interface.

    See the p4 undoc help for a full explanation of the Perforce SSO scheme -- it will not be explained here in any detail.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  ISSOCallback.Status
      SSO callback return status.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAX_CRED_LENGTH
      Maximum length in bytes allowed for the SSO credentials sent back to the Perforce server.
    • Field Detail

      • MAX_CRED_LENGTH

        static final int MAX_CRED_LENGTH
        Maximum length in bytes allowed for the SSO credentials sent back to the Perforce server. Any StringBuffer passed to the method(s) below will be truncated to this length before transmission.
        See Also:
        Constant Field Values
    • Method Detail

      • getSSOCredentials

        ISSOCallback.Status getSSOCredentials​(java.lang.StringBuffer credBuffer,
                                              java.lang.String ssoKey,
                                              java.lang.String userName)
        Return the Single Sign On (SSO) credentials for a specific Perforce server and Perforce user combination.

        If the method returns true, the associated string buffer contents are truncated (if necessary) to MAX_CRED_LENGTH bytes, then passed back to the Perforce server's SSO handler. If the method returns false, P4Java returns an auth fail to the Perforce server and it reacts accordingly. No character set translation or any other changes are made to the contents of the buffer before transmission.

        Note: as with all P4Java callbacks, providers are responsible for ensuring that the callback is thread-safe and does not block.

        Parameters:
        credBuffer - StringBuffer to be filled in with SSO credentials to be sent back to the Perforce server
        ssoKey - possibly-null opaque string associated with this callback and IServer object by a previous register call.
        userName - current Perforce user name for the IServer; may be null if no user name has yet been associated with the server.
        Returns:
        status of whether the credential buffer was retrieve (Status.PASS), not retrieved (Status.FAIL), or not attempted to be retrieved (Status.UNSET).