Class ImmutableAuthorizationProvider

    • Constructor Detail

      • ImmutableAuthorizationProvider

        public ImmutableAuthorizationProvider​(String authorization)
    • Method Detail

      • fromAppInstallationToken

        public static AuthorizationProvider fromAppInstallationToken​(String appInstallationToken)
        Builds and returns a AuthorizationProvider from a given App Installation Token
        appInstallationToken - A string containing the GitHub App installation token
        the configured Builder from given GitHub App installation token.
      • fromLoginAndPassword

        public static AuthorizationProvider fromLoginAndPassword​(String login,
                                                                 String password)
        Login with password credentials are no longer supported by GitHub
        Builds and returns a AuthorizationProvider from the given user/password pair
        login - The login for the user, usually the same as the username
        password - The password for the associated user
        a correctly configured AuthorizationProvider that will always return the credentials for the same user and password combo
      • getEncodedAuthorization

        public String getEncodedAuthorization()
        Description copied from interface: AuthorizationProvider
        Returns the credentials to be used with a given request. As an example, a authorization provider for a bearer token will return something like:
          public String getEncodedAuthorization() {
          return "Bearer myBearerToken";
        Specified by:
        getEncodedAuthorization in interface AuthorizationProvider
        encoded authorization string, can be null