Class ServiceProviderToken.ServiceProviderTokenBuilder

    • Method Detail

      • authorizedBy

        public ServiceProviderToken.ServiceProviderTokenBuilder authorizedBy​(String user)
        Sets the user that authorized the request token and returns this builder to allow other optional attributes to be set or the final request Token instance to be constructed.
        Parameters:
        user - name of the user that authorized the Consumer to make requests on behalf of themselves
        Returns:
        this builder
      • deniedBy

        public ServiceProviderToken.ServiceProviderTokenBuilder deniedBy​(String user)
        Sets the user that denied the request token and returns this builder to allow other optional attributes to be set or the final request Token instance to be constructed.
        Parameters:
        user - name of the user that denied the Consumer to make requests on behalf of themselves
        Returns:
        this builder
      • verifier

        public ServiceProviderToken.ServiceProviderTokenBuilder verifier​(String verifier)
        Sets the verifier value to use to determine that the authorizing user is the same as the user swapping the request token for an access token and returns this builder to allow other optional attributes to be set or the final request Token instance to be constructed.
        Parameters:
        verifier - value to use to determine that the authorizing user is the same as the user swapping the request token for an access token
        Returns:
        this builder
      • creationTime

        public ServiceProviderToken.ServiceProviderTokenBuilder creationTime​(long creationTime)
        Sets the creationTime attribute of the token and returns this builder to allow other optional attributes to be set or the final request Token instance to be constructed.
        Parameters:
        creationTime - time the token was originally created
        Returns:
        this builder
      • timeToLive

        public ServiceProviderToken.ServiceProviderTokenBuilder timeToLive​(long timeToLive)
        Sets the timeToLive attribute of the token and returns this builder to allow other optional attributes to be set or the final request Token instance to be constructed.
        Parameters:
        timeToLive - how long the token is valid for
        Returns:
        this builder
      • callback

        public ServiceProviderToken.ServiceProviderTokenBuilder callback​(@Nullable
                                                                         URI callback)
        Sets the callback attribute of the token and returns this builder to allow other optional attributes to be set or the final request Token instance to be constructed. A null callback value indicates that the callback has been established out-of-band, via some other form of communication between the consumer and the service provider.
        Parameters:
        callback - callback token attributes value
        Returns:
        this builder