Class PlaintextMethod

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME
      Method name.
    • Constructor Summary

      Constructors 
      Constructor Description
      PlaintextMethod()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String name()
      Returns the name of this signature method, as negotiated through the OAuth protocol.
      java.lang.String sign​(java.lang.String baseString, OAuth1Secrets secrets)
      Generates the PLAINTEXT signature.
      boolean verify​(java.lang.String elements, OAuth1Secrets secrets, java.lang.String signature)
      Verifies the Plaintext signature.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PlaintextMethod

        public PlaintextMethod()
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: OAuth1SignatureMethod
        Returns the name of this signature method, as negotiated through the OAuth protocol.
        Specified by:
        name in interface OAuth1SignatureMethod
        Returns:
        Signature method name.
      • sign

        public java.lang.String sign​(java.lang.String baseString,
                                     OAuth1Secrets secrets)
        Generates the PLAINTEXT signature.
        Specified by:
        sign in interface OAuth1SignatureMethod
        Parameters:
        baseString - the OAuth elements to sign (ignored).
        secrets - the shared secrets used to sign the request.
        Returns:
        the plaintext OAuth signature.
      • verify

        public boolean verify​(java.lang.String elements,
                              OAuth1Secrets secrets,
                              java.lang.String signature)
        Verifies the Plaintext signature.
        Specified by:
        verify in interface OAuth1SignatureMethod
        Parameters:
        elements - OAuth elements (ignored).
        secrets - the shared secrets for verifying the signature.
        signature - plaintext OAuth signature to be verified.
        Returns:
        true if the signature matches the secrets and data.