| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_HOST_TOKEN_VALIDATOR_BASE_H_ | 5 #ifndef REMOTING_HOST_TOKEN_VALIDATOR_BASE_H_ |
| 6 #define REMOTING_HOST_TOKEN_VALIDATOR_BASE_H_ | 6 #define REMOTING_HOST_TOKEN_VALIDATOR_BASE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 void OnResponseStarted(net::URLRequest* source, int net_result) override; | 46 void OnResponseStarted(net::URLRequest* source, int net_result) override; |
| 47 void OnReadCompleted(net::URLRequest* source, int net_result) override; | 47 void OnReadCompleted(net::URLRequest* source, int net_result) override; |
| 48 void OnReceivedRedirect(net::URLRequest* request, | 48 void OnReceivedRedirect(net::URLRequest* request, |
| 49 const net::RedirectInfo& redirect_info, | 49 const net::RedirectInfo& redirect_info, |
| 50 bool* defer_redirect) override; | 50 bool* defer_redirect) override; |
| 51 void OnCertificateRequested( | 51 void OnCertificateRequested( |
| 52 net::URLRequest* source, | 52 net::URLRequest* source, |
| 53 net::SSLCertRequestInfo* cert_request_info) override; | 53 net::SSLCertRequestInfo* cert_request_info) override; |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 void OnCertificatesSelected(net::CertificateList* selected_certs, | 56 void OnCertificatesSelected(net::ClientCertStore* unused, |
| 57 net::ClientCertStore* unused); | 57 net::CertificateList selected_certs); |
| 58 | 58 |
| 59 virtual void StartValidateRequest(const std::string& token) = 0; | 59 virtual void StartValidateRequest(const std::string& token) = 0; |
| 60 virtual void ContinueWithCertificate(net::X509Certificate* client_cert, | 60 virtual void ContinueWithCertificate(net::X509Certificate* client_cert, |
| 61 net::SSLPrivateKey* client_private_key); | 61 net::SSLPrivateKey* client_private_key); |
| 62 virtual bool IsValidScope(const std::string& token_scope); | 62 virtual bool IsValidScope(const std::string& token_scope); |
| 63 std::string ProcessResponse(int net_result); | 63 std::string ProcessResponse(int net_result); |
| 64 | 64 |
| 65 // Constructor parameters. | 65 // Constructor parameters. |
| 66 ThirdPartyAuthConfig third_party_auth_config_; | 66 ThirdPartyAuthConfig third_party_auth_config_; |
| 67 std::string token_scope_; | 67 std::string token_scope_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 87 base::Callback<void(const std::string& shared_secret)> on_token_validated_; | 87 base::Callback<void(const std::string& shared_secret)> on_token_validated_; |
| 88 | 88 |
| 89 base::WeakPtrFactory<TokenValidatorBase> weak_factory_; | 89 base::WeakPtrFactory<TokenValidatorBase> weak_factory_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(TokenValidatorBase); | 91 DISALLOW_COPY_AND_ASSIGN(TokenValidatorBase); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace remoting | 94 } // namespace remoting |
| 95 | 95 |
| 96 #endif // REMOTING_HOST_TOKEN_VALIDATOR_BASE_H | 96 #endif // REMOTING_HOST_TOKEN_VALIDATOR_BASE_H |
| OLD | NEW |