Example #1
0
        public override async Task DeserializeRefreshToken([NotNull] DeserializeRefreshTokenContext context)
        {
            var options = (OpenIddictOptions)context.Options;

            if (options.DisableTokenRevocation)
            {
                return;
            }

            context.Ticket = await ReceiveTokenAsync(
                OpenIdConnectConstants.TokenUsages.RefreshToken,
                context.RefreshToken, options,
                context.Request, context.DataFormat);

            // Prevent the OpenID Connect server middleware from using its default logic.
            context.HandleDeserialization();
        }
Example #2
0
        public override async Task DeserializeRefreshToken([NotNull] DeserializeRefreshTokenContext context)
        {
            var options = (OpenIddictOptions)context.Options;

            if (!options.UseReferenceTokens)
            {
                return;
            }

            context.Ticket = await ReceiveTokenAsync(
                context.RefreshToken, options, context.HttpContext,
                context.Request, context.DataFormat);

            // Prevent the OpenID Connect server middleware from using
            // its default logic to deserialize the reference token.
            context.HandleDeserialization();
        }