Click here to Skip to main content
15,878,852 members
Home / Discussions / C#
   

C#

 
GeneralRe: Unzip file from resources Pin
JCompiler22-Aug-18 2:33
JCompiler22-Aug-18 2:33 
GeneralRe: Unzip file from resources Pin
Richard Deeming22-Aug-18 2:43
mveRichard Deeming22-Aug-18 2:43 
GeneralRe: Unzip file from resources Pin
JCompiler22-Aug-18 3:05
JCompiler22-Aug-18 3:05 
GeneralRe: Unzip file from resources Pin
JCompiler22-Aug-18 4:30
JCompiler22-Aug-18 4:30 
GeneralRe: Unzip file from resources Pin
Richard Deeming22-Aug-18 4:42
mveRichard Deeming22-Aug-18 4:42 
AnswerRe: Unzip file from resources Pin
jschell25-Aug-18 4:36
jschell25-Aug-18 4:36 
GeneralRe: Unzip file from resources Pin
Richard Deeming28-Aug-18 3:06
mveRichard Deeming28-Aug-18 3:06 
QuestionUse custom services inside OAuthorizationProviders Pin
Member 1204569221-Aug-18 3:39
Member 1204569221-Aug-18 3:39 
Im currently developing a token based web api.

In my startup.cs, I have the following code:
C#
OAuthAuthorizationServerOptions OAuthServerOptions = new OAuthAuthorizationServerOptions()
        {
            AllowInsecureHttp = true,
            TokenEndpointPath = new PathString("/token"),
            AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(30),
            Provider = new SimpleAuthorizationServerProvider(),
            RefreshTokenProvider = new SimpleRefreshTokenProvider()
        };


Here is some code from my SimpleAuthorizationServerProvider:
C#
public class SimpleAuthorizationServerProvider : OAuthAuthorizationServerProvider
    {
        private readonly IAuthService _authService;

        public SimpleAuthorizationServerProvider(IAuthService authService)
        {
            _authService = authService;
        }
     }


The problem I have is that I get the following error in my startup.cs:
There is no argument givet that corresponds to the required formal parameter 'authService' of SimpleAuthenticationProver.SimpleAuthenticationprover(IAuthService)

I also get the same for SimpleRefreshTokenProvider, because Im using my authservice there too.

So how can I fix this In a nice way? I want to use my authservice inside my providers.
AnswerRe: Use custom services inside OAuthorizationProviders Pin
Pete O'Hanlon21-Aug-18 4:01
mvePete O'Hanlon21-Aug-18 4:01 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
Member 1204569221-Aug-18 4:09
Member 1204569221-Aug-18 4:09 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
dan!sh 21-Aug-18 4:41
professional dan!sh 21-Aug-18 4:41 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
Member 1204569221-Aug-18 8:34
Member 1204569221-Aug-18 8:34 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
Dave Kreskowiak21-Aug-18 9:29
mveDave Kreskowiak21-Aug-18 9:29 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
OriginalGriff21-Aug-18 4:59
mveOriginalGriff21-Aug-18 4:59 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
Member 1204569221-Aug-18 8:30
Member 1204569221-Aug-18 8:30 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
OriginalGriff21-Aug-18 8:38
mveOriginalGriff21-Aug-18 8:38 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
Member 1204569221-Aug-18 20:27
Member 1204569221-Aug-18 20:27 
AnswerRe: Use custom services inside OAuthorizationProviders Pin
Richard Deeming22-Aug-18 2:40
mveRichard Deeming22-Aug-18 2:40 
Questionhelp to solve C# codes Pin
Ali 2Fan19-Aug-18 9:32
Ali 2Fan19-Aug-18 9:32 
AnswerRe: help to solve C# codes Pin
OriginalGriff19-Aug-18 9:34
mveOriginalGriff19-Aug-18 9:34 
AnswerRe: help to solve C# codes Pin
Dave Kreskowiak20-Aug-18 10:49
mveDave Kreskowiak20-Aug-18 10:49 
QuestionHow to Merge DataGridView Cell in Winforms ? Pin
Member 245846715-Aug-18 17:32
Member 245846715-Aug-18 17:32 
AnswerRe: How to Merge DataGridView Cell in Winforms ? Pin
dan!sh 16-Aug-18 3:20
professional dan!sh 16-Aug-18 3:20 
QuestionC# add usb device to appxmanifest capabilities for Bosch BNO055 Pin
RAFish040415-Aug-18 8:48
RAFish040415-Aug-18 8:48 
AnswerRe: C# add usb device to appxmanifest capabilities for Bosch BNO055 Pin
Richard Andrew x6415-Aug-18 12:37
professionalRichard Andrew x6415-Aug-18 12:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.