AuthenticationService v0.3.0+7-g8a7f190
Public Member Functions | Static Public Member Functions | Properties | List of all members
Joutsen.AuthenticationControl.AuthenticatedCommand Class Referenceabstract

A base class used when the command requires authentication before it is executed. More...

Public Member Functions

 AuthenticatedCommand (IServiceProvider services)
 
abstract void ExecuteAuthenticated ()
 In derived classes contains the logic of the command. More...
 
override void Execute ()
 

Static Public Member Functions

static new SubParser ConfigureParser (SubParser parser)
 Can be used to configure a parser with the credentials argument. More...
 

Properties

String Credentials [set]
 The username and password separated by a colon used to authenticate the execution of a command. More...
 
Authenticator AuthProvider [get]
 The schema for the authentication database. More...
 

Detailed Description

A base class used when the command requires authentication before it is executed.

Remarks
The command will always check the credentials before executing any logic. If no valid credentials are provided the logic will not be executed. In order to pass the credentials check, the provided user must be authenticated using a password and needs to have the "Admin" role for the AuthenticationService. Additionally the command will ask for missing credentials using the command line.
Since
0.1.0

Constructor & Destructor Documentation

◆ AuthenticatedCommand()

Joutsen.AuthenticationControl.AuthenticatedCommand.AuthenticatedCommand ( IServiceProvider  services)

Member Function Documentation

◆ ConfigureParser()

static new SubParser Joutsen.AuthenticationControl.AuthenticatedCommand.ConfigureParser ( SubParser  parser)
static

Can be used to configure a parser with the credentials argument.

◆ Execute()

override void Joutsen.AuthenticationControl.AuthenticatedCommand.Execute ( )

◆ ExecuteAuthenticated()

abstract void Joutsen.AuthenticationControl.AuthenticatedCommand.ExecuteAuthenticated ( )
pure virtual

Property Documentation

◆ AuthProvider

Authenticator Joutsen.AuthenticationControl.AuthenticatedCommand.AuthProvider
get

The schema for the authentication database.

The authentication provider used to check the credentials.

◆ Credentials

String Joutsen.AuthenticationControl.AuthenticatedCommand.Credentials
set

The username and password separated by a colon used to authenticate the execution of a command.