Safe Haskell | None |
---|---|
Language | Haskell2010 |
GitHub.Auth
Synopsis
- data Auth
- type Token = ByteString
- type JWTToken = Text
- class AuthMethod a
- endpoint :: AuthMethod a => a -> Maybe Text
- setAuthRequest :: AuthMethod a => a -> Request -> Request
Documentation
The Github auth data type
Constructors
BasicAuth ByteString ByteString | Username and password |
OAuth Token | OAuth token |
JWT JWTToken | JWT Token |
EnterpriseOAuth Text Token | Custom endpoint and OAuth token |
Instances
type Token = ByteString Source #
class AuthMethod a Source #
A type class for different authentication methods
Note the ()
intance, which doee nothing, i.e. is unauthenticated.
Minimal complete definition
setAuthRequest :: AuthMethod a => a -> Request -> Request Source #
A function which sets authorisation on an HTTP request