Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -AsCredential option for Basic/Form authentication #743

Closed
Badgerati opened this issue May 19, 2021 · 0 comments · Fixed by #746
Closed

Add -AsCredential option for Basic/Form authentication #743

Badgerati opened this issue May 19, 2021 · 0 comments · Fixed by #746
Assignees
Milestone

Comments

@Badgerati
Copy link
Owner

Basic and Form authentication from New-PodeAuthScheme, currently supply username/password parameters to the Add-PodeAuth scriptblock:

New-PodeAuthScheme -Basic | Add-PodeAuth -Name 'Login' -ScriptBlock {
        param($username, $password)
}

In most cases you probably just need a pscredentials object. So this is to add a new -AsCredential switch to New-PodeAuthScheme for Basic/Form authentication only. When supplied, Pode will supply the username and password as a pscredential instead:

New-PodeAuthScheme -Basic -AsCredential | Add-PodeAuth -Name 'Login' -ScriptBlock {
        param($creds)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant