<commit_before>/*
 * Copyright (c) 2011 Digital Bazaar, Inc. All rights reserved.
 */
#ifndef monarch_oauth1_OAuth1Provider_H
#define monarch_oauth1_OAuth1Provider_H

#include "monarch/oauth1/OAuth1.h"

namespace monarch
{
namespace oauth1
{

/**
 * An OAuth1Provider is an interface used by an OAuth1 object to perform its
 * duties. The implementing class of OAuth1Provider provides storage for
 * OAuth tokens and other customizations that are necessary to authenticate
 * clients of the service provided.
 *
 * @author <NAME>
 */
class OAuth1Provider
{
public:
   /**
    * Creates a new OAuth1Provider.
    */
   OAuth1Provider() {};

   /**
    * Destructs this OAuth1Provider.
    */
   virtual ~OAuth1Provider() {};

   /**
    * Validates a timestamp and nonce against an optional token. All values
    * are provided in the given OAuth1Params object.
    *
    * oauth_consumer_key: The client ID.
    * outh_nonce: The nonce.
    * oauth_timestamp: The timestamp.
    * oauth_token: The optional token, may not be present.
    *
    * @param params the OAuth1Params.
    * @param update if true, updates the timestamp and nonce values in storage
    *           so that the same token-timestamp-nonce combination cannot
    *           be re-used.
    *
    * @return true if the timestamp and nonce were validated, false if not
    *         with exception set.
    */
   virtual bool validateTimestampAndNonce(
      OAuth1Params& params, bool update) = 0;

   /**
    * Gets the client secret associated with the given OAuth1Params object.
    *
    * @param params the OAuth1Params.
    * @param secret a string to fill with the client secret if found.
    *
    * @return true if successful, false if not with exception set.
    */
   virtual bool getClientSecret(OAuth1Params& params, std::string& secret) = 0;

   /**
    * Gets the token secret associated with the given OAuth1Params object and
    * token type.
    *
    * @param params the OAuth1Params.
    * @param tokenType the token type (AccessToken or RequestToken only).
    * @param secret a string to fill with the client secret if found.
    *
    * @return true if successful, false if not with exception set.
    */
   virtual bool getTokenSecret(
      OAuth1Params& params, OAuth1::TokenType tokenType,
      std::string& secret) = 0;




   // FIXME:


   /**
    * {@inheritDoc}
    */
   virtual bool getRequestSecret(const char* id, std::string& secret);

   /**
    * {@inheritDoc}
    */
   virtual bool getRequestCallback(const char* id, std::string& callback);

   /**
    * {@inheritDoc}
    */
   virtual bool getRequestVerifier(const char* id, std::string& verifier);

   /**
    * {@inheritDoc}
    */
   virtual bool getTokenSecret(const char* id, std::string& secret);

};

} // end namespace oauth1
} // end namespace monarch
#endif<commit_msg>Removed methods.<commit_after>/*
 * Copyright (c) 2011 Digital Bazaar, Inc. All rights reserved.
 */
#ifndef monarch_oauth1_OAuth1Provider_H
#define monarch_oauth1_OAuth1Provider_H

#include "monarch/oauth1/OAuth1.h"

namespace monarch
{
namespace oauth1
{

/**
 * An OAuth1Provider is an interface used by an OAuth1 object to perform its
 * duties. The implementing class of OAuth1Provider provides storage for
 * OAuth tokens and other customizations that are necessary to authenticate
 * clients of the service provided.
 *
 * @author <NAME>
 */
class OAuth1Provider
{
public:
   /**
    * Creates a new OAuth1Provider.
    */
   OAuth1Provider() {};

   /**
    * Destructs this OAuth1Provider.
    */
   virtual ~OAuth1Provider() {};

   /**
    * Validates a timestamp and nonce against an optional token. All values
    * are provided in the given OAuth1Params object.
    *
    * oauth_consumer_key: The client ID.
    * outh_nonce: The nonce.
    * oauth_timestamp: The timestamp.
    * oauth_token: The optional token, may not be present.
    *
    * @param params the OAuth1Params.
    * @param update if true, updates the timestamp and nonce values in storage
    *           so that the same token-timestamp-nonce combination cannot
    *           be re-used.
    *
    * @return true if the timestamp and nonce were validated, false if not
    *         with exception set.
    */
   virtual bool validateTimestampAndNonce(
      OAuth1Params& params, bool update) = 0;

   /**
    * Gets the client secret associated with the given OAuth1Params object.
    *
    * @param params the OAuth1Params.
    * @param secret a string to fill with the client secret if found.
    *
    * @return true if successful, false if not with exception set.
    */
   virtual bool getClientSecret(OAuth1Params& params, std::string& secret) = 0;

   /**
    * Gets the token secret associated with the given OAuth1Params object and
    * token type.
    *
    * @param params the OAuth1Params.
    * @param tokenType the token type (AccessToken or RequestToken only).
    * @param secret a string to fill with the client secret if found.
    *
    * @return true if successful, false if not with exception set.
    */
   virtual bool getTokenSecret(
      OAuth1Params& params, OAuth1::TokenType tokenType,
      std::string& secret) = 0;
};

} // end namespace oauth1
} // end namespace monarch
#endif
{'fraction_non_alphanumeric': 0.08543096872616324, 'fraction_numerical': 0.012585812356979404, 'mean_word_length': 2.8794378698224854, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '330184', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1511, 'n_words': 563}