From: pvschakradhar <48746416+pvschakradhar@users.noreply.github.com>
Date: Thu, 17 Oct 2019 22:57:32 +0000 (+0530)
Subject: Deprecate of Tizen.Account.OAuth2 (#1094)
X-Git-Tag: 5.5_M2~9
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=efb8ecb6e658ecfb16c43e97116ace725c0449ba;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git
Deprecate of Tizen.Account.OAuth2 (#1094)
---
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AccessToken.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AccessToken.cs
index 4d185a0..9cc135d 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AccessToken.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AccessToken.cs
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+using System;
using System.Collections.Generic;
namespace Tizen.Account.OAuth2
@@ -22,6 +22,7 @@ namespace Tizen.Account.OAuth2
/// Class containing access token and related information.
///
/// 3
+ [Obsolete]
public class AccessToken
{
internal AccessToken()
@@ -32,24 +33,28 @@ namespace Tizen.Account.OAuth2
/// The lifetime in seconds of the access token.
///
/// 3
+ [Obsolete]
public long ExpiresIn { get; internal set;}
///
/// The access token issued by the authorization server.
///
/// 3
+ [Obsolete]
public string Token { get; internal set;}
///
/// The scope of the access token.
///
/// 3
+ [Obsolete]
public IEnumerable Scope { get; internal set;}
///
/// The type of the access token.
///
/// 3
+ [Obsolete]
public string TokenType { get; internal set;}
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthenticationScheme.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthenticationScheme.cs
index 6f385e7..9775ff9 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthenticationScheme.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthenticationScheme.cs
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+using System;
namespace Tizen.Account.OAuth2
{
///
@@ -22,6 +23,7 @@ namespace Tizen.Account.OAuth2
///
/// 3
/// Facebook and Google does not support HTTP Basic Authentication, instead they require client credentials to be sent via request body.
+ [Obsolete]
public enum AuthenticationScheme
{
///
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthorizationRequest.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthorizationRequest.cs
index e6a4a4d..08e7784 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthorizationRequest.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthorizationRequest.cs
@@ -23,54 +23,63 @@ namespace Tizen.Account.OAuth2
/// The request parameters to be sent to authorization end point.
///
/// 3
+ [Obsolete]
public abstract class AuthorizationRequest
{
///
/// The desired response type from the OAuth authorization end point.
///
/// 3
+ [Obsolete]
public abstract string ResponseType { get; }
///
/// Client secret credentials.
///
/// 3
+ [Obsolete]
public ClientCredentials ClientSecrets { get; set; }
///
/// The scope of the access.
///
/// 3
+ [Obsolete]
public IEnumerable Scopes { get; set; }
///
/// The authorization end point URL.
///
/// 3
+ [Obsolete]
public Uri AuthorizationEndpoint { get; set; }
///
/// The redirection endpoint of the auhorization flow.
///
/// 3
+ [Obsolete]
public Uri RedirectionEndPoint { get; set; }
///
/// The access token end point URL.
///
/// 3
+ [Obsolete]
public Uri TokenEndpoint { get; set; }
///
/// The client's state which is maintained between request and response.
///
/// 3
+ [Obsolete]
public string State { get; set; }
///
/// Custom key-value parameters to be sent to the server
///
/// 3
+ [Obsolete]
public IEnumerable> CustomData { get; set; }
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthorizationResponse.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthorizationResponse.cs
index c1fe528..e70e002 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthorizationResponse.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/AuthorizationResponse.cs
@@ -23,6 +23,7 @@ namespace Tizen.Account.OAuth2
/// The response containing authroization code from the authorization server.
///
/// 3
+ [Obsolete]
public class AuthorizationResponse : IDisposable
{
private bool _disposed = false;
@@ -47,6 +48,7 @@ namespace Tizen.Account.OAuth2
/// Releases any unmanaged resources used by this object.
///
/// 3
+ [Obsolete]
public void Dispose()
{
Dispose(true);
@@ -58,6 +60,7 @@ namespace Tizen.Account.OAuth2
///
/// 3
/// If true, disposes any disposable objects. If false, does not dispose disposable objects.
+ [Obsolete]
protected virtual void Dispose(bool disposing)
{
if (_disposed)
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/Authorizer.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/Authorizer.cs
index e7363dc..bce6f1a 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/Authorizer.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/Authorizer.cs
@@ -27,6 +27,7 @@ namespace Tizen.Account.OAuth2
/// Also service provider document needs to be referred for using end points and additional parameters.
///
/// 3
+ [Obsolete]
public abstract class Authorizer : IDisposable
{
@@ -37,6 +38,7 @@ namespace Tizen.Account.OAuth2
/// Constructor for Authoirzer instances
///
/// 3
+ [Obsolete]
public Authorizer()
{
int ret = Interop.Manager.Create(out _managerHandle);
@@ -60,6 +62,7 @@ namespace Tizen.Account.OAuth2
/// Indicates if the current instance is already handling an authorization request
///
/// 3
+ [Obsolete]
public bool IsRequestInProgress
{
get
@@ -73,6 +76,7 @@ namespace Tizen.Account.OAuth2
/// Releases any unmanaged resources used by this object.
///
/// 3
+ [Obsolete]
public void Dispose()
{
Dispose(true);
@@ -88,6 +92,7 @@ namespace Tizen.Account.OAuth2
/// http://tizen.org/privilege/internet
/// Thrown when method failed due to invalid argumets
/// Thrown when method fails due to server error
+ [Obsolete]
public virtual async Task RefreshAccessTokenAsync(RefreshTokenRequest request)
{
IntPtr requestHandle = GetRequestHandle(request);
@@ -182,6 +187,7 @@ namespace Tizen.Account.OAuth2
///
/// 3
/// If true, disposes any disposable objects. If false, does not dispose disposable objects.
+ [Obsolete]
protected virtual void Dispose(bool disposing)
{
if (_disposed)
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentials.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentials.cs
index 3b6f58b..d5c7ebb 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentials.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentials.cs
@@ -22,12 +22,14 @@ namespace Tizen.Account.OAuth2
/// Contains client credentials required for authentication in request-body
///
/// 3
+ [Obsolete]
public class ClientCredentials
{
///
/// The constructor
///
/// 3
+ [Obsolete]
public ClientCredentials()
{
@@ -37,12 +39,14 @@ namespace Tizen.Account.OAuth2
/// The client identifier
///
/// 3
+ [Obsolete]
public string Id { get; set; }
///
/// The client secret
///
/// 3
+ [Obsolete]
public string Secret { get; set; }
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentialsAuthorizer.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentialsAuthorizer.cs
index a004b8a..54000ca 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentialsAuthorizer.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentialsAuthorizer.cs
@@ -24,12 +24,14 @@ namespace Tizen.Account.OAuth2
/// The ClientCredentialsAuthorizer is used to obtain access tokens using Client Credentials Grant flow as described at https://tools.ietf.org/html/rfc6749#section-4.4
///
/// 3
+ [Obsolete]
public class ClientCredentialsAuthorizer : Authorizer
{
///
/// The constructor
///
/// 3
+ [Obsolete]
public ClientCredentialsAuthorizer()
{
@@ -40,6 +42,7 @@ namespace Tizen.Account.OAuth2
///
/// 3
/// Thrown when the operation is not supported
+ [Obsolete]
public Task AuthorizeAsync(AuthorizationRequest request)
{
Log.Error(ErrorFactory.LogTag, "Authorization is not supported in this flow");
@@ -51,6 +54,7 @@ namespace Tizen.Account.OAuth2
///
/// 3
/// Thrown when the operation is not supported
+ [Obsolete]
public override Task RefreshAccessTokenAsync(RefreshTokenRequest request)
{
Log.Error(ErrorFactory.LogTag, "Refreshing access token is not supported in this flow");
@@ -67,6 +71,7 @@ namespace Tizen.Account.OAuth2
/// http://tizen.org/privilege/internet
/// Thrown when method failed due to invalid argumets
/// Thrown when method fails due to server error
+ [Obsolete]
public async Task GetAccessTokenAsync(TokenRequest request)
{
IntPtr requestHandle = GetRequestHandle(request as ClientCredentialsTokenRequest);
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentialsTokenRequest.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentialsTokenRequest.cs
index a57225f..eede281 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentialsTokenRequest.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ClientCredentialsTokenRequest.cs
@@ -22,12 +22,14 @@ namespace Tizen.Account.OAuth2
/// The class contains request parameters for retreiving access token in Client Credentials Grant flow.
///
/// 3
+ [Obsolete]
public class ClientCredentialsTokenRequest : TokenRequest
{
///
/// The constructor
///
/// 3
+ [Obsolete]
public ClientCredentialsTokenRequest()
{
@@ -37,6 +39,7 @@ namespace Tizen.Account.OAuth2
/// The grant type.
///
/// 3
+ [Obsolete]
public override string GrantType { get; } = "client_credentials";
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantAuthorizationRequest.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantAuthorizationRequest.cs
index 2935117..f85086c 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantAuthorizationRequest.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantAuthorizationRequest.cs
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+using System;
namespace Tizen.Account.OAuth2
{
///
@@ -21,12 +22,14 @@ namespace Tizen.Account.OAuth2
/// Please refer https://tools.ietf.org/html/rfc6749#section-4.1.1 for more details
///
/// 3
+ //[Obsolete]
public class CodeGrantAuthorizationRequest : AuthorizationRequest
{
///
/// The constructor
///
/// 3
+ [Obsolete]
public CodeGrantAuthorizationRequest()
{
@@ -36,6 +39,7 @@ namespace Tizen.Account.OAuth2
/// The response type parameter to authorization server.
///
/// 3
+ [Obsolete]
public override string ResponseType { get; } = "code";
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantAuthorizer.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantAuthorizer.cs
index 14f0f31..6500981 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantAuthorizer.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantAuthorizer.cs
@@ -25,12 +25,14 @@ namespace Tizen.Account.OAuth2
/// The CodeGrantAuthorizer is used to obtain access tokens and refresh tokens using Authorization Code Grant flow as described at https://tools.ietf.org/html/rfc6749#section-4.1
///
/// 3
+ [Obsolete]
public class CodeGrantAuthorizer : Authorizer
{
///
/// The constructor
///
/// 3
+ [Obsolete]
public CodeGrantAuthorizer()
{
@@ -48,6 +50,7 @@ namespace Tizen.Account.OAuth2
/// http://tizen.org/privilege/internet
/// Thrown when method failed due to invalid argumets
/// Thrown when method fails due to server error
+ [Obsolete]
public async Task GetAccessTokenAsync(TokenRequest request)
{
IntPtr requestHandle = GetRequestHandle(request as CodeGrantTokenRequest);
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantTokenRequest.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantTokenRequest.cs
index 38d21f9..fdeecdb 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantTokenRequest.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantTokenRequest.cs
@@ -22,12 +22,14 @@ namespace Tizen.Account.OAuth2
/// The class contains request parameters for retreiving access token in Authorization Code Grant flow.
///
/// 3
+ [Obsolete]
public class CodeGrantTokenRequest : TokenRequest
{
///
/// The constructor
///
/// 3
+ [Obsolete]
public CodeGrantTokenRequest()
{
@@ -37,12 +39,14 @@ namespace Tizen.Account.OAuth2
/// The grant type
///
/// 3
+ [Obsolete]
public override string GrantType { get; } = "authorization_code";
///
/// The authoriztion code received from the authorization server.
///
/// 3
+ [Obsolete]
public string Code { get; set; }
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ImplicitGrantAuthorizationRequest.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ImplicitGrantAuthorizationRequest.cs
index 7c9b642..c1436b4 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ImplicitGrantAuthorizationRequest.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ImplicitGrantAuthorizationRequest.cs
@@ -14,18 +14,21 @@
* limitations under the License.
*/
+using System;
namespace Tizen.Account.OAuth2
{
///
/// The class contains request parameters for retreiving access token in Implicit Grant flow.
///
/// 3
+ [Obsolete]
public class ImplicitGrantAuthorizationRequest : AuthorizationRequest
{
///
/// The constructor
///
/// 3
+ [Obsolete]
public ImplicitGrantAuthorizationRequest()
{
@@ -35,6 +38,7 @@ namespace Tizen.Account.OAuth2
/// The response type parameter to aturhoization server.
///
/// 3
+ [Obsolete]
public override string ResponseType { get; } = "token";
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ImplicitGrantAuthorizer.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ImplicitGrantAuthorizer.cs
index 0b7867a..7efd698 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ImplicitGrantAuthorizer.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ImplicitGrantAuthorizer.cs
@@ -25,12 +25,14 @@ namespace Tizen.Account.OAuth2
/// The ImplicitGrantAuthorizer is used to obtain access tokens using Implicit Grant flow as described at https://tools.ietf.org/html/rfc6749#section-4.2
///
/// 3
+ [Obsolete]
public class ImplicitGrantAuthorizer : Authorizer
{
///
/// The constructor
///
/// 3
+ [Obsolete]
public ImplicitGrantAuthorizer()
{
@@ -41,6 +43,7 @@ namespace Tizen.Account.OAuth2
///
/// 3
/// Thrown when the operation is not supported
+ [Obsolete]
public Task GetAccessTokenAsync(TokenRequest request)
{
Log.Error(ErrorFactory.LogTag, "Obtain token directly from authorization grant ");
@@ -52,6 +55,7 @@ namespace Tizen.Account.OAuth2
///
/// 3
/// Thrown when the operation is not supported
+ [Obsolete]
public override Task RefreshAccessTokenAsync(RefreshTokenRequest request)
{
Log.Error(ErrorFactory.LogTag, "Refesh token is not supported in Implicit Grant flow");
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/OAuth2ErrorResponse.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/OAuth2ErrorResponse.cs
index 9e8d3fe..2e41b30 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/OAuth2ErrorResponse.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/OAuth2ErrorResponse.cs
@@ -22,6 +22,7 @@ namespace Tizen.Account.OAuth2
/// Exception wrapper for OAuth2 related exception
///
/// 3
+ [Obsolete]
public class OAuth2Exception : Exception
{
internal OAuth2Exception()
@@ -32,6 +33,7 @@ namespace Tizen.Account.OAuth2
/// The error response.
///
/// 3
+ [Obsolete]
public OAuth2ErrorResponse Error { get; internal set; }
}
@@ -39,6 +41,7 @@ namespace Tizen.Account.OAuth2
/// Wrapper class contaning OAuth2 related error information
///
/// 3
+ [Obsolete]
public class OAuth2ErrorResponse
{
internal OAuth2ErrorResponse ()
@@ -50,24 +53,28 @@ namespace Tizen.Account.OAuth2
/// The server error code
///
/// 3
+ [Obsolete]
public int ServerErrorCode { get; internal set; }
///
/// The platform error cocde
///
/// 3
+ [Obsolete]
public int PlatformErrorCode { get; internal set; }
///
/// Error description
///
/// 3
+ [Obsolete]
public string Error { get; internal set; }
///
/// URI of the error page.
///
/// 3
+ [Obsolete]
public string ErrorUri { get; internal set; }
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/RefreshToken.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/RefreshToken.cs
index 5050563..8ed9e74 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/RefreshToken.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/RefreshToken.cs
@@ -14,12 +14,14 @@
* limitations under the License.
*/
+using System;
namespace Tizen.Account.OAuth2
{
///
/// The refresh token which can be used to obtain new access token.
///
/// 3
+ [Obsolete]
public class RefreshToken
{
internal RefreshToken ()
@@ -31,6 +33,7 @@ namespace Tizen.Account.OAuth2
/// The refresh token issued to the client.
///
/// 3
+ [Obsolete]
public string Token { get; internal set; }
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/RefreshTokenRequest.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/RefreshTokenRequest.cs
index 0928ab6..8c3a46c 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/RefreshTokenRequest.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/RefreshTokenRequest.cs
@@ -14,18 +14,22 @@
* limitations under the License.
*/
+using System;
+
namespace Tizen.Account.OAuth2
{
///
/// The class contains request parameters for refreshing an access token.
///
/// 3
+ [Obsolete]
public class RefreshTokenRequest : TokenRequest
{
///
/// The constructor
///
/// 3
+ [Obsolete]
public RefreshTokenRequest()
{
@@ -35,12 +39,14 @@ namespace Tizen.Account.OAuth2
/// The grant type to be used
///
/// 3
+ [Obsolete]
public override string GrantType { get; } = "refresh_token";
///
/// The refresh token issued by authorization server.
///
/// 3
+ [Obsolete]
public string RefreshToken { get; set; }
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ResourceOwnerPwdCredentialsAuthorizer.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ResourceOwnerPwdCredentialsAuthorizer.cs
index 9cfed28..a181d99 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ResourceOwnerPwdCredentialsAuthorizer.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ResourceOwnerPwdCredentialsAuthorizer.cs
@@ -25,12 +25,14 @@ namespace Tizen.Account.OAuth2
/// The ResourceOwnerPwdCredentialsAuthorizer is used to obtain access tokens using Resource Owner Password Credentials Grant flow as described at https://tools.ietf.org/html/rfc6749#section-4.3
///
/// 3
+ [Obsolete]
public class ResourceOwnerPwdCredentialsAuthorizer : Authorizer
{
///
/// The constructor
///
/// 3
+ [Obsolete]
public ResourceOwnerPwdCredentialsAuthorizer()
{
@@ -41,6 +43,7 @@ namespace Tizen.Account.OAuth2
///
/// 3
/// Thrown when the operation is not supported
+ [Obsolete]
public Task AuthorizeAsync(AuthorizationRequest request)
{
Log.Error(ErrorFactory.LogTag, "Authorization is not supported in this flow");
@@ -57,6 +60,7 @@ namespace Tizen.Account.OAuth2
/// http://tizen.org/privilege/internet
/// Thrown when method failed due to invalid argumets
/// Thrown when method fails due to server error
+ [Obsolete]
public async Task GetAccessTokenAsync(TokenRequest request)
{
IntPtr requestHandle = GetRequestHandle(request as ResourceOwnerPwdCredentialsTokenRequest);
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ResourceOwnerPwdCredentialsTokenRequest.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ResourceOwnerPwdCredentialsTokenRequest.cs
index e8c3afc..0a2f5eb 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ResourceOwnerPwdCredentialsTokenRequest.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ResourceOwnerPwdCredentialsTokenRequest.cs
@@ -14,18 +14,22 @@
* limitations under the License.
*/
+using System;
+
namespace Tizen.Account.OAuth2
{
///
/// The class contains request parameters for retreiving access token in Resource Owner Password Credentials Grant flow.
///
/// 3
+ [Obsolete]
public class ResourceOwnerPwdCredentialsTokenRequest : TokenRequest
{
///
/// The constructor
///
/// 3
+ [Obsolete]
public ResourceOwnerPwdCredentialsTokenRequest()
{
@@ -35,18 +39,21 @@ namespace Tizen.Account.OAuth2
/// The grant type
///
/// 3
+ [Obsolete]
public override string GrantType { get; } = "password";
///
/// The resource owner username
///
/// 3
+ [Obsolete]
public string Username { get; set; }
///
/// The resource owner password
///
/// 3
+ [Obsolete]
public string Password { get; set; }
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/TokenRequest.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/TokenRequest.cs
index 1575c22..2573cac 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/TokenRequest.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/TokenRequest.cs
@@ -23,54 +23,63 @@ namespace Tizen.Account.OAuth2
/// Abstract wrapper class containing OAuth 2.0 request parameters for requesting an access token.
///
/// 3
+ [Obsolete]
public abstract class TokenRequest
{
///
/// The Grant type
///
/// 3
+ [Obsolete]
public abstract string GrantType { get; }
///
/// The client credentials
///
/// 3
+ [Obsolete]
public ClientCredentials ClientSecrets { get; set; }
///
/// The access token end point URL.
///
/// 3
+ [Obsolete]
public Uri TokenEndpoint { get; set; }
///
/// The redirection endpoint of the auhorization flow.
///
/// 3
+ [Obsolete]
public Uri RedirectionEndPoint { get; set; }
///
/// The scope of the access request as described by https://tools.ietf.org/html/rfc6749#section-3.3
///
/// 3
+ [Obsolete]
public IEnumerable Scopes { get; set; }
///
/// Custom key-value parameters to be sent to the server
///
/// 3
+ [Obsolete]
public IEnumerable> CustomData { get; set; }
///
/// Client authentication scheme. Default is Basic
///
/// 3
+ [Obsolete]
public AuthenticationScheme AuthenticationScheme { get; set; } = AuthenticationScheme.Basic;
///
/// The client's state which is maintained between request and response.
///
/// 3
+ [Obsolete]
public string State { get; set; }
}
}
diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/TokenResponse.cs b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/TokenResponse.cs
index 0783268..620d2b6 100755
--- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/TokenResponse.cs
+++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/TokenResponse.cs
@@ -23,6 +23,7 @@ namespace Tizen.Account.OAuth2
/// The response from authroization server containing access token and an optional refresh token.
///
/// 3
+ [Obsolete]
public class TokenResponse
{
private bool _disposed = false;
@@ -46,6 +47,7 @@ namespace Tizen.Account.OAuth2
/// The access token
///
/// 3
+ [Obsolete]
public AccessToken AccessToken { get; internal set; }
///
@@ -55,6 +57,7 @@ namespace Tizen.Account.OAuth2
///
/// The value can be null depending on the server specifications.
///
+ [Obsolete]
public string State { get; internal set; }
///
@@ -64,6 +67,7 @@ namespace Tizen.Account.OAuth2
///
/// Issuing a refresh token is optional at the discretion of the authorization server.
///
+ [Obsolete]
public RefreshToken RefreshToken { get; internal set; }
///
@@ -72,6 +76,7 @@ namespace Tizen.Account.OAuth2
/// 3
/// The value of respecitve key
/// Thrown when the key does not exist or when there is an invalid parameter.
+ [Obsolete]
public string GetCustomValue(string key)
{
IntPtr value;
@@ -88,6 +93,7 @@ namespace Tizen.Account.OAuth2
/// Releases any unmanaged resources used by this object.
///
/// 3
+ [Obsolete]
public void Dispose()
{
Dispose(true);
@@ -99,6 +105,7 @@ namespace Tizen.Account.OAuth2
///
/// 3
/// If true, disposes any disposable objects. If false, does not dispose disposable objects.
+ [Obsolete]
protected virtual void Dispose(bool disposing)
{
if (_disposed)