reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ClientAuthExtension.hxx
Go to the documentation of this file.
1#if !defined(CLIENT_AUTH_EXTENSION_HXX)
2#define CLIENT_AUTH_EXTENSION_HXX
3
4#include <time.h>
5
6#include <time.h>
7
10#include "resip/stack/Uri.hxx"
13#include "rutil/Data.hxx"
16
17namespace resip
18{
19
20class SipMessage;
21class NameAddr;
22class SecurityAttributes;
23class Security;
24
26{
27 public:
29 virtual void makeChallengeResponseAuth(const SipMessage& request,
30 const Data& username,
31 const Data& password,
32 const Auth& challenge,
33 const Data& cnonce,
34 const Data& authQop,
35 const Data& nonceCountString,
36 Auth& auth);
37 virtual void makeChallengeResponseAuthWithA1(const SipMessage& request,
38 const Data& username,
39 const Data& passwordHashA1,
40 const Auth& challenge,
41 const Data& cnonce,
42 const Data& authQop,
43 const Data& nonceCountString,
44 Auth& auth);
45
46 virtual bool algorithmAndQopSupported(const Auth& challenge);
47
48 static void setInstance(std::unique_ptr<ClientAuthExtension> ext) noexcept;
50 {
51 return *mInstance;
52 }
53 protected:
55
56
57 static std::unique_ptr<ClientAuthExtension> mInstance;
58
59};
60
61}
62
63#endif
64
65/* ====================================================================
66 * The Vovida Software License, Version 1.0
67 *
68 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
69 *
70 * Redistribution and use in source and binary forms, with or without
71 * modification, are permitted provided that the following conditions
72 * are met:
73 *
74 * 1. Redistributions of source code must retain the above copyright
75 * notice, this list of conditions and the following disclaimer.
76 *
77 * 2. Redistributions in binary form must reproduce the above copyright
78 * notice, this list of conditions and the following disclaimer in
79 * the documentation and/or other materials provided with the
80 * distribution.
81 *
82 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
83 * and "Vovida Open Communication Application Library (VOCAL)" must
84 * not be used to endorse or promote products derived from this
85 * software without prior written permission. For written
86 * permission, please contact vocal@vovida.org.
87 *
88 * 4. Products derived from this software may not be called "VOCAL", nor
89 * may "VOCAL" appear in their name, without prior written
90 * permission of Vovida Networks, Inc.
91 *
92 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
93 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
94 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
95 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
96 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
97 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
98 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
99 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
100 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
101 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
102 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
103 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
104 * DAMAGE.
105 *
106 * ====================================================================
107 *
108 * This software consists of voluntary contributions made by Vovida
109 * Networks, Inc. and many individuals on behalf of Vovida Networks,
110 * Inc. For more information on Vovida Networks, Inc., please see
111 * <http://www.vovida.org/>.
112 *
113 */
Represents the "credentials" and "challenge" elements in the SIP grammar.
Definition Auth.hxx:18
static std::unique_ptr< ClientAuthExtension > mInstance
static ClientAuthExtension & instance()
static void setInstance(std::unique_ptr< ClientAuthExtension > ext) noexcept
virtual void makeChallengeResponseAuthWithA1(const SipMessage &request, const Data &username, const Data &passwordHashA1, const Auth &challenge, const Data &cnonce, const Data &authQop, const Data &nonceCountString, Auth &auth)
virtual void makeChallengeResponseAuth(const SipMessage &request, const Data &username, const Data &password, const Auth &challenge, const Data &cnonce, const Data &authQop, const Data &nonceCountString, Auth &auth)
virtual bool algorithmAndQopSupported(const Auth &challenge)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Represents a SIP message.
dcm! – add UnusedChecking(_enum) below;