New-PodeAuthCustomScheme
SYNOPSIS
Creates a new Custom Authentication Scheme.
SYNTAX
New-PodeAuthCustomScheme [[-Realm] <String>] [-ScriptBlock] <ScriptBlock> [[-ArgumentList] <Hashtable>]
[[-Name] <String>] [[-Type] <String>] [[-PostValidator] <ScriptBlock>] [[-Description] <String>]
[[-Middleware] <Object[]>] [[-InnerScheme] <Hashtable>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
DESCRIPTION
Creates a new Custom Authentication Scheme.
EXAMPLES
EXAMPLE 1
$scheme = New-PodeAuthCustomScheme -ScriptBlock { ... }
EXAMPLE 2
$scheme = New-PodeAuthCustomScheme -ScriptBlock { param($_args) ... } -ArgumentList @{ FieldName = 'username' }
PARAMETERS
-ArgumentList
An optional hashtable of arguments to pass to the ScriptBlock.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Description
An optional short description for the Authentication Scheme. CommonMark syntax MAY be used for rich text representation.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-InnerScheme
An optional Authentication Scheme (such as New-PodeAuthBasicScheme) that will be called prior to this Scheme.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Middleware
An optional array of Middleware ScriptBlocks to run before the Scheme's scriptblock.
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
An optional Name for the Authentication Scheme.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PostValidator
An optional ScriptBlock to validate the authentication result after the main ScriptBlock has run.
Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Realm
An optional Realm to use. (Default: User)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: User
Accept pipeline input: False
Accept wildcard characters: False
-ScriptBlock
The ScriptBlock that contains the custom authentication logic, to parse the request and return a user credentials and other information.
Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Type
The type of the Authentication Scheme. Valid values are 'ApiKey', 'Http', 'OAuth2', and 'OpenIdConnect'. (Default: 'Http')
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: Http
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.