Skip to content

New-PodeAuthBasicScheme

SYNOPSIS

Creates a new Basic Authentication Scheme.

SYNTAX

New-PodeAuthBasicScheme [[-Realm] <String>] [[-Encoding] <String>] [[-HeaderTag] <String>]
 [[-Description] <String>] [[-Middleware] <Object[]>] [[-InnerScheme] <Hashtable>] [-AsCredential]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Creates a new Basic Authentication Scheme.

EXAMPLES

EXAMPLE 1

$scheme = New-PodeAuthBasicScheme

EXAMPLE 2

$scheme = New-PodeAuthBasicScheme -HeaderTag 'Custom' -AsCredential

EXAMPLE 3

$scheme = New-PodeAuthBasicScheme -Encoding 'ASCII'

PARAMETERS

-AsCredential

Indicates whether the credentials should be passed as a PSCredential object.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Description

An optional short description for Authentication Scheme. CommonMark syntax MAY be used for rich text representation.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Encoding

The encoding to use for the Basic Authentication header. (Default: ISO-8859-1)

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: ISO-8859-1
Accept pipeline input: False
Accept wildcard characters: False

-HeaderTag

The "Tag" name to use in the Authorization header during parsing. (Default: Basic)

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: Basic
Accept pipeline input: False
Accept wildcard characters: False

-InnerScheme

An optional Authentication Scheme (such as New-PodeAuthFormScheme) that will be called prior to this Scheme.

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
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: 5
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

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.

INPUTS

OUTPUTS

System.Collections.Hashtable

NOTES