Click here to Skip to main content
15,566,114 members
Home / Discussions / C#
   

C#

 
GeneralRe: Unzip file from resources Pin
JCompiler22-Aug-18 3:33
JCompiler22-Aug-18 3:33 
GeneralRe: Unzip file from resources Pin
Richard Deeming22-Aug-18 3:43
mveRichard Deeming22-Aug-18 3:43 
GeneralRe: Unzip file from resources Pin
JCompiler22-Aug-18 4:05
JCompiler22-Aug-18 4:05 
GeneralRe: Unzip file from resources Pin
JCompiler22-Aug-18 5:30
JCompiler22-Aug-18 5:30 
GeneralRe: Unzip file from resources Pin
Richard Deeming22-Aug-18 5:42
mveRichard Deeming22-Aug-18 5:42 
AnswerRe: Unzip file from resources Pin
jschell25-Aug-18 5:36
jschell25-Aug-18 5:36 
GeneralRe: Unzip file from resources Pin
Richard Deeming28-Aug-18 4:06
mveRichard Deeming28-Aug-18 4:06 
QuestionUse custom services inside OAuthorizationProviders Pin
Member 1204569221-Aug-18 4:39
Member 1204569221-Aug-18 4: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 5:01
mvaPete O'Hanlon21-Aug-18 5:01 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
Member 1204569221-Aug-18 5:09
Member 1204569221-Aug-18 5:09 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
dan!sh 21-Aug-18 5:41
professional dan!sh 21-Aug-18 5:41 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
Member 1204569221-Aug-18 9:34
Member 1204569221-Aug-18 9:34 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
Dave Kreskowiak21-Aug-18 10:29
mveDave Kreskowiak21-Aug-18 10:29 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
OriginalGriff21-Aug-18 5:59
mvaOriginalGriff21-Aug-18 5:59 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
Member 1204569221-Aug-18 9:30
Member 1204569221-Aug-18 9:30 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
OriginalGriff21-Aug-18 9:38
mvaOriginalGriff21-Aug-18 9:38 
GeneralRe: Use custom services inside OAuthorizationProviders Pin
Member 1204569221-Aug-18 21:27
Member 1204569221-Aug-18 21:27 
AnswerRe: Use custom services inside OAuthorizationProviders Pin
Richard Deeming22-Aug-18 3:40
mveRichard Deeming22-Aug-18 3:40 
Questionhelp to solve C# codes Pin
Ali 2Fan19-Aug-18 10:32
Ali 2Fan19-Aug-18 10:32 
AnswerRe: help to solve C# codes Pin
OriginalGriff19-Aug-18 10:34
mvaOriginalGriff19-Aug-18 10:34 
AnswerRe: help to solve C# codes Pin
Dave Kreskowiak20-Aug-18 11:49
mveDave Kreskowiak20-Aug-18 11:49 
QuestionHow to Merge DataGridView Cell in Winforms ? Pin
Member 245846715-Aug-18 18:32
Member 245846715-Aug-18 18:32 
AnswerRe: How to Merge DataGridView Cell in Winforms ? Pin
dan!sh 16-Aug-18 4:20
professional dan!sh 16-Aug-18 4:20 
QuestionC# add usb device to appxmanifest capabilities for Bosch BNO055 Pin
RAFish040415-Aug-18 9:48
RAFish040415-Aug-18 9:48 
AnswerRe: C# add usb device to appxmanifest capabilities for Bosch BNO055 Pin
Richard Andrew x6415-Aug-18 13:37
professionalRichard Andrew x6415-Aug-18 13: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.