Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
GitHub.App.Token
Contents
Synopsis
- generateInstallationToken :: MonadIO m => AppCredentials -> InstallationId -> m AccessToken
- data AppCredentials = AppCredentials {
- appId :: AppId
- privateKey :: PrivateKey
- newtype AppId = AppId {}
- newtype PrivateKey = PrivateKey {
- unwrap :: ByteString
- newtype InstallationId = InstallationId {}
- data AccessToken = AccessToken {
- token :: Text
- expires_at :: UTCTime
- data CreateAccessToken = CreateAccessToken {
- repositories :: [Text]
- repository_ids :: [Int]
- permissions :: Permissions
- module GitHub.App.Token.Permissions
- generateInstallationTokenScoped :: MonadIO m => CreateAccessToken -> AppCredentials -> InstallationId -> m AccessToken
Documentation
generateInstallationToken :: MonadIO m => AppCredentials -> InstallationId -> m AccessToken Source #
Generate a token for all repositories and the installation's permissions
See generateInstallationTokenScoped
for changing either of these.
data AppCredentials Source #
Constructors
AppCredentials | |
Fields
|
newtype PrivateKey Source #
Constructors
PrivateKey | |
Fields
|
Instances
Show PrivateKey Source # | |
Defined in GitHub.App.Token.JWT Methods showsPrec :: Int -> PrivateKey -> ShowS # show :: PrivateKey -> String # showList :: [PrivateKey] -> ShowS # |
newtype InstallationId Source #
Constructors
InstallationId | |
data AccessToken Source #
Constructors
AccessToken | |
Fields
|
Instances
FromJSON AccessToken Source # | |
Defined in GitHub.App.Token.Generate | |
Generic AccessToken Source # | |
Defined in GitHub.App.Token.Generate Associated Types type Rep AccessToken :: Type -> Type # | |
Show AccessToken Source # | |
Defined in GitHub.App.Token.Generate Methods showsPrec :: Int -> AccessToken -> ShowS # show :: AccessToken -> String # showList :: [AccessToken] -> ShowS # | |
HasExpiresAt AccessToken Source # | |
Defined in GitHub.App.Token.Refresh Methods expiresAt :: AccessToken -> UTCTime Source # | |
type Rep AccessToken Source # | |
Defined in GitHub.App.Token.Generate type Rep AccessToken = D1 ('MetaData "AccessToken" "GitHub.App.Token.Generate" "github-app-token-0.0.2.0-2zJ8C3bSxtwJScDB0unpYX" 'False) (C1 ('MetaCons "AccessToken" 'PrefixI 'True) (S1 ('MetaSel ('Just "token") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "expires_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime))) |
Scoped
data CreateAccessToken Source #
Constructors
CreateAccessToken | |
Fields
|
Instances
module GitHub.App.Token.Permissions
generateInstallationTokenScoped :: MonadIO m => CreateAccessToken -> AppCredentials -> InstallationId -> m AccessToken Source #