|
|
|
@ -389,62 +389,62 @@ namespace OpenIddict.Core |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Retrieves the reference identifier associated with a token.
|
|
|
|
/// Note: depending on the manager used to create the token,
|
|
|
|
/// the reference identifier may be hashed for security reasons.
|
|
|
|
/// Retrieves the unique identifier associated with a token.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="token">The token.</param>
|
|
|
|
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
|
|
|
|
/// <returns>
|
|
|
|
/// A <see cref="Task"/> that can be used to monitor the asynchronous operation,
|
|
|
|
/// whose result returns the reference identifier associated with the specified token.
|
|
|
|
/// whose result returns the unique identifier associated with the token.
|
|
|
|
/// </returns>
|
|
|
|
public virtual Task<string> GetReferenceIdAsync([NotNull] TToken token, CancellationToken cancellationToken) |
|
|
|
public virtual Task<string> GetIdAsync([NotNull] TToken token, CancellationToken cancellationToken) |
|
|
|
{ |
|
|
|
if (token == null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException(nameof(token)); |
|
|
|
} |
|
|
|
|
|
|
|
return Store.GetReferenceIdAsync(token, cancellationToken); |
|
|
|
return Store.GetIdAsync(token, cancellationToken); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Retrieves the unique identifier associated with a token.
|
|
|
|
/// Retrieves the payload associated with a token.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="token">The token.</param>
|
|
|
|
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
|
|
|
|
/// <returns>
|
|
|
|
/// A <see cref="Task"/> that can be used to monitor the asynchronous operation,
|
|
|
|
/// whose result returns the unique identifier associated with the token.
|
|
|
|
/// whose result returns the payload associated with the specified token.
|
|
|
|
/// </returns>
|
|
|
|
public virtual Task<string> GetIdAsync([NotNull] TToken token, CancellationToken cancellationToken) |
|
|
|
public virtual Task<string> GetPayloadAsync([NotNull] TToken token, CancellationToken cancellationToken) |
|
|
|
{ |
|
|
|
if (token == null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException(nameof(token)); |
|
|
|
} |
|
|
|
|
|
|
|
return Store.GetIdAsync(token, cancellationToken); |
|
|
|
return Store.GetPayloadAsync(token, cancellationToken); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Retrieves the payload associated with a token.
|
|
|
|
/// Retrieves the reference identifier associated with a token.
|
|
|
|
/// Note: depending on the manager used to create the token,
|
|
|
|
/// the reference identifier may be hashed for security reasons.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="token">The token.</param>
|
|
|
|
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
|
|
|
|
/// <returns>
|
|
|
|
/// A <see cref="Task"/> that can be used to monitor the asynchronous operation,
|
|
|
|
/// whose result returns the payload associated with the specified token.
|
|
|
|
/// whose result returns the reference identifier associated with the specified token.
|
|
|
|
/// </returns>
|
|
|
|
public virtual Task<string> GetPayloadAsync([NotNull] TToken token, CancellationToken cancellationToken) |
|
|
|
public virtual Task<string> GetReferenceIdAsync([NotNull] TToken token, CancellationToken cancellationToken) |
|
|
|
{ |
|
|
|
if (token == null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException(nameof(token)); |
|
|
|
} |
|
|
|
|
|
|
|
return Store.GetPayloadAsync(token, cancellationToken); |
|
|
|
return Store.GetReferenceIdAsync(token, cancellationToken); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|