Merge PodeAuth - mdaneri/Pode GitHub Wiki
external help file: Pode-help.xml Module Name: Pode online version: PodeType: Authentication schema: 2.0.0
Lets you merge multiple Authentication methods together, into a "single" Authentication method.
Merge-PodeAuth -Name <String> -Authentication <String[]> [-Valid <String>] [-ScriptBlock <ScriptBlock>]
[-Default <String>] [-FailureUrl <String>] [-FailureMessage <String>] [-SuccessUrl <String>] [-Sessionless]
[-SuccessUseOrigin] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Merge-PodeAuth -Name <String> -Authentication <String[]> [-Valid <String>] [-Default <String>]
[-MergeDefault <String>] [-FailureUrl <String>] [-FailureMessage <String>] [-SuccessUrl <String>]
[-Sessionless] [-SuccessUseOrigin] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Lets you merge multiple Authentication methods together, into a "single" Authentication method. You can specify if only One or All of the methods need to pass to allow access, and you can also merge other merged Authentication methods for more advanced scenarios.
Merge-PodeAuth -Name MergedAuth -Authentication ApiTokenAuth, BasicAuth -Valid All -ScriptBlock { ... }
Merge-PodeAuth -Name MergedAuth -Authentication ApiTokenAuth, BasicAuth -Valid All -MergeDefault BasicAuth
Merge-PodeAuth -Name MergedAuth -Authentication ApiTokenAuth, BasicAuth -FailureUrl 'http://localhost:8080/login'
Multiple Autentication method Names to be merged.
Type: String[]
Parameter Sets: (All)
Aliases: Auth
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe Default Authentication method to use as a fallback for Failure URLs and other settings.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseAn override Message to throw when authentication fails. This will be used as fallback for the merged Authentication methods if not set on them.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe URL to redirect to when authentication fails. This will be used as fallback for the merged Authentication methods if not set on them.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe Default Authentication method's User details result object to use, when $Valid=All.
Type: String
Parameter Sets: MergeDefault
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA unique Name for the Authentication method.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis is mandatory, and only used, when $Valid=All. A scriptblock to merge the mutliple users/headers returned by valid authentications into 1 user/header objects. This scriptblock will receive a hashtable of all result objects returned from Authentication methods. The key for the hashtable will be the authentication names that passed.
Type: ScriptBlock
Parameter Sets: ScriptBlock
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIf supplied, authenticated users will not be stored in sessions, and sessions will not be used. This will be used as fallback for the merged Authentication methods if not set on them.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThe URL to redirect to when authentication succeeds when logging in. This will be used as fallback for the merged Authentication methods if not set on them.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIf supplied, successful authentication from a login page will redirect back to the originating page instead of the FailureUrl. This will be used as fallback for the merged Authentication methods if not set on them.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseHow many of the Authentication methods are required to be valid, One or All. (Default: One)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: One
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.