forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support authentication tokens for uploading to Hackage (haskell#9058)
* Add token authorization for cabal upload Add token flag. If a token is set ignore the username and password. The token is passed to Hackage in the Authorization header. * Add token flag to upload documentation * Add token authentication for cabal report * Update auth token documentation and changelog * Add token flag to config integration tests * Add auth token header to plain-http transport * Add documentation and reduce wildcard usage Use Nothing in pattern matching instead of wildcards. * Add auth token headers to wget and powershell * Fix auth token header for powershell transport Powershell has to have the Authorization token set in the Header dictionary parameter. Some headers (e.g. User-Agent) have to be set as a request parameter. * Fix code formatting to comply with fourmolu
- Loading branch information
Showing
13 changed files
with
163 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
module Distribution.Client.Types.Credentials | ||
( Username (..) | ||
( Auth | ||
, Token (..) | ||
, Username (..) | ||
, Password (..) | ||
) where | ||
|
||
import Prelude (String) | ||
import Prelude (Either, String) | ||
|
||
-- | Either (username, password) or authentacation token | ||
type Auth = Either (String, String) String | ||
|
||
newtype Token = Token {unToken :: String} | ||
newtype Username = Username {unUsername :: String} | ||
newtype Password = Password {unPassword :: String} |
Oops, something went wrong.