summaryrefslogtreecommitdiffstats
path: root/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-05-29 17:26:58 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2012-05-29 17:26:58 -0700
commit7f61a61f4e9073af1f62f15f08e8f0893bffee5e (patch)
tree836349f00068fd7c76f13a6d25545223dfa57f12 /projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs
parent09f9f16cd42c79712ae2265e4484cca64990f7cb (diff)
downloadDotNetOpenAuth-7f61a61f4e9073af1f62f15f08e8f0893bffee5e.zip
DotNetOpenAuth-7f61a61f4e9073af1f62f15f08e8f0893bffee5e.tar.gz
DotNetOpenAuth-7f61a61f4e9073af1f62f15f08e8f0893bffee5e.tar.bz2
Resource owner password grant method rename
Renamed IAuthorizationServerHost.IsResourceOwnerCredentialValid to TryAuthorizeResourceOwnerCredentialGrant so that authorization servers are prepared to approve refresh tokens that may be issued as a result of a resource owner password grant. This also removes some of the "validation" that wasn't really doing anything useful for resource owner password grant types. Toward an eventual fix for #138
Diffstat (limited to 'projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs')
-rw-r--r--projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs b/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs
index 3ec1390..a5eb09c 100644
--- a/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs
+++ b/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs
@@ -118,7 +118,9 @@ namespace RelyingPartyLogic {
}
/// <summary>
- /// Determines whether a given set of resource owner credentials is valid based on the authorization server's user database.
+ /// Determines whether a given set of resource owner credentials is valid based on the authorization server's user database
+ /// and if so records an authorization entry such that subsequent calls to <see cref="IsAuthorizationValid"/> would
+ /// return <c>true</c>.
/// </summary>
/// <param name="userName">Username on the account.</param>
/// <param name="password">The user's password.</param>
@@ -134,7 +136,7 @@ namespace RelyingPartyLogic {
/// <c>true</c> if the given credentials are valid; otherwise, <c>false</c>.
/// </returns>
/// <exception cref="NotSupportedException">May be thrown if the authorization server does not support the resource owner password credential grant type.</exception>
- public bool IsResourceOwnerCredentialValid(string userName, string password, IAccessTokenRequest accessRequest, out string canonicalUserName) {
+ public bool TryAuthorizeResourceOwnerCredentialGrant(string userName, string password, IAccessTokenRequest accessRequest, out string canonicalUserName) {
// This web site delegates user authentication to OpenID Providers, and as such no users have local passwords with this server.
throw new NotSupportedException();
}