diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-11-11 20:31:02 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-11-11 20:31:02 -0800 |
commit | 99bf04b289adee5dda23b06011f7249c00d885f4 (patch) | |
tree | 991f1d1037d37bb4a93ec078a0805b965ac97d80 /src | |
parent | 83d3efa71da483d55900cbd38d17afa4b6403bef (diff) | |
download | DotNetOpenAuth-99bf04b289adee5dda23b06011f7249c00d885f4.zip DotNetOpenAuth-99bf04b289adee5dda23b06011f7249c00d885f4.tar.gz DotNetOpenAuth-99bf04b289adee5dda23b06011f7249c00d885f4.tar.bz2 |
Enforces signing of access tokens at auth server
Diffstat (limited to 'src')
3 files changed, 16 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerStrings.Designer.cs b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerStrings.Designer.cs index 4b4f830..8941a94 100644 --- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerStrings.Designer.cs +++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerStrings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.17614 +// Runtime Version:4.0.30319.18010 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -70,6 +70,15 @@ namespace DotNetOpenAuth.OAuth2 { } /// <summary> + /// Looks up a localized string similar to The access token's private signing key must be set.. + /// </summary> + internal static string AccessTokenSigningKeyMissing { + get { + return ResourceManager.GetString("AccessTokenSigningKeyMissing", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to The callback URL ({0}) is not allowed for this client.. /// </summary> internal static string ClientCallbackDisallowed { diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerStrings.resx b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerStrings.resx index 29d841a..8aaa567 100644 --- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerStrings.resx +++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerStrings.resx @@ -112,14 +112,17 @@ <value>2.0</value> </resheader> <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <data name="AccessScopeExceedsGrantScope" xml:space="preserve"> <value>The requested access scope exceeds the grant scope.</value> </data> + <data name="AccessTokenSigningKeyMissing" xml:space="preserve"> + <value>The access token's private signing key must be set.</value> + </data> <data name="ClientCallbackDisallowed" xml:space="preserve"> <value>The callback URL ({0}) is not allowed for this client.</value> </data> diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServerAccessToken.cs b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServerAccessToken.cs index c577a0a..a127166 100644 --- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServerAccessToken.cs +++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServerAccessToken.cs @@ -45,6 +45,7 @@ namespace DotNetOpenAuth.OAuth2 { /// </summary> /// <returns>A non-empty string.</returns> protected internal override string Serialize() { + ErrorUtilities.VerifyHost(this.AccessTokenSigningKey != null, AuthServerStrings.AccessTokenSigningKeyMissing); var formatter = CreateFormatter(this.AccessTokenSigningKey, this.ResourceServerEncryptionKey); return formatter.Serialize(this); } |