RMS SDK for C++  0.2.1
A client library for using Microsoft RMS from Linux.
AuthenticationRequest.h
1 /*
2  * ======================================================================
3  * Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
4  * Licensed under the MIT License.
5  * See LICENSE.md in the project root for license information.
6  * ======================================================================
7 */
8 
9 #ifndef AUTHENTICATIONREQUEST_H
10 #define AUTHENTICATIONREQUEST_H
11 
12 #include "types.h"
13 #include "PromptBehavior.h"
14 
15 namespace rmsauth {
16 enum class UserIdentifierType
17 {
18  UniqueId,
19  LoginHint,
20  NoUser
21 };
22 
27 {
28 public:
29 // /**
30 // * Developer can use acquiretoken(with loginhint) or acquireTokenSilent(with
31 // * userid), so this sets the type of the request.
32 // */
33 
34 // AuthenticationRequest()
35 // : mIdentifierType (UserIdentifierType::NoUser)
36 // {}
37 
38 // AuthenticationRequest(const String& authority, String resource, const String& client, const String& redirect,
39 // const String& loginhint, PromptBehavior prompt, const String& extraQueryParams, UUID correlationId)
40 // : mAuthority (authority)
41 // , mResource (resource)
42 // , mClientId (client)
43 // , mRedirectUri (redirect)
44 // , mLoginHint (loginhint)
45 // , mPrompt (prompt)
46 // , mExtraQueryParamsAuthentication (extraQueryParams)
47 // , mCorrelationId (correlationId)
48 // , mIdentifierType (UserIdentifierType::NoUser)
49 // {}
50 
51 // AuthenticationRequest(const String& authority, const String& resource, const String& client, const String& redirect, const String& loginhint, UUID correlationId)
52 // : mAuthority (authority)
53 // , mResource (resource)
54 // , mClientId (client)
55 // , mRedirectUri (redirect)
56 // , mLoginHint (loginhint)
57 // , mCorrelationId (correlationId)
58 // {}
59 
60 // AuthenticationRequest(const String& authority, const String& resource, const String& client, const String& redirect, const String& loginhint)
61 // : mAuthority (authority)
62 // , mResource (resource)
63 // , mClientId (client)
64 // , mRedirectUri (redirect)
65 // , mLoginHint (loginhint)
66 // {}
67 
68 // AuthenticationRequest(const String& authority, const String& resource, const String& clientid)
69 // : mAuthority (authority)
70 // , mResource (resource)
71 // , mClientId (clientid)
72 // {}
73 
74 // /**
75 // * Cache usage and refresh token requests.
76 // *
77 // * @param authority
78 // * @param resource
79 // * @param clientid
80 // * @param userid
81 // * @param correlationId
82 // */
83 // AuthenticationRequest(const String& authority, const String& resource, const String& clientid, const String& userid, const UUID& correlationId)
84 // : mAuthority (authority)
85 // , mResource (resource)
86 // , mClientId (clientid)
87 // , mUserId (userid)
88 // , mCorrelationId (correlationId)
89 
90 // {}
91 
92 // AuthenticationRequest(const String& authority, const String& resource, const String& clientId, const UUID& correlationId)
93 // : mAuthority (authority)
94 // , mResource (resource)
95 // , mClientId (clientId)
96 // , mCorrelationId (correlationId)
97 
98 // {}
99 
100 // const String& getAuthority() const
101 // {
102 // return mAuthority;
103 // }
104 
105 // void setAuthority(const String& authority)
106 // {
107 // mAuthority = authority;
108 // }
109 
110 // const String& getRedirectUri() const
111 // {
112 // return mRedirectUri;
113 // }
114 
115 // const String& getResource() const
116 // {
117 // return mResource;
118 // }
119 
120 // const String& getClientId() const
121 // {
122 // return mClientId;
123 // }
124 
125 // const String& getLoginHint() const
126 // {
127 // return mLoginHint;
128 // }
129 
130 // const UUID& getCorrelationId() const
131 // {
132 // return this->mCorrelationId;
133 // }
134 
135 // const String& getExtraQueryParamsAuthentication() const
136 // {
137 // return mExtraQueryParamsAuthentication;
138 // }
139 
140 // String getLogInfo() const
141 // {
142 // StringStream ss;
143 // ss << "Request authority: " << mAuthority
144 // << " resource: " << mResource
145 // << " clientid: " << mClientId;
146 // return ss.str();
147 // }
148 
149 // const PromptBehavior& getPrompt() const
150 // {
151 // return mPrompt;
152 // }
153 
154 // void setPrompt(const PromptBehavior& prompt)
155 // {
156 // this->mPrompt = prompt;
157 // }
158 
159 // /**
160 // * @return the mRequestId related to the delegate
161 // */
162 // int getRequestId() const
163 // {
164 // return mRequestId;
165 // }
166 
167 // /**
168 // * @param requestId the requestId to set
169 // */
170 // void setRequestId(int requestId)
171 // {
172 // this->mRequestId = requestId;
173 // }
174 
175 // const String& getBrokerAccountName() const
176 // {
177 // return mBrokerAccountName;
178 // }
179 
180 // void setBrokerAccountName(const String& brokerAccountName)
181 // {
182 // this->mBrokerAccountName = brokerAccountName;
183 // }
184 
185 // void setLoginHint(const String& name)
186 // {
187 // mLoginHint = name;
188 // }
189 
190 // const String& getUserId() const
191 // {
192 // return mUserId;
193 // }
194 
195 // void setUserId(const String& userId)
196 // {
197 // this->mUserId = userId;
198 // }
199 
200 // bool isSilent() const
201 // {
202 // return mSilent;
203 // }
204 
205 // void setSilent(bool silent)
206 // {
207 // this->mSilent = silent;
208 // }
209 
210 // const String& getVersion() const
211 // {
212 // return mVersion;
213 // }
214 
215 // void setVersion(const String& version)
216 // {
217 // this->mVersion = version;
218 // }
219 
220 // const UserIdentifierType& getUserIdentifierType() const
221 // {
222 // return mIdentifierType;
223 // }
224 
225 // void setUserIdentifierType(const UserIdentifierType& user)
226 // {
227 // mIdentifierType = user;
228 // }
229 
230 //private:
231 // int mRequestId = 0;
232 
233 // String mAuthority;
234 
235 // String mRedirectUri;
236 
237 // String mResource;
238 
239 // String mClientId;
240 
241 // String mLoginHint;
242 
243 // String mUserId;
244 
245 // String mBrokerAccountName;
246 
247 // UUID mCorrelationId;
248 
249 // String mExtraQueryParamsAuthentication;
250 
251 // PromptBehavior mPrompt;
252 
253 // bool mSilent = false;
254 
255 // String mVersion;
256 
257 // UserIdentifierType mIdentifierType;
258 };
259 }; // namespace rmsauth
260 #endif // AUTHENTICATIONREQUEST_H
Definition: AuthenticationRequest.h:26
Definition: AcquireTokenForClientHandler.h:14