Class AccessInferredRepository
java.lang.Object
hudson.model.AbstractDescribableImpl<RepositoryAccessStrategy>
org.jenkinsci.plugins.github_branch_source.app_credentials.RepositoryAccessStrategy
org.jenkinsci.plugins.github_branch_source.app_credentials.AccessInferredRepository
- All Implemented Interfaces:
Describable<RepositoryAccessStrategy>
,Serializable
This mode allows
GitHubAppCredentials
to generate an installation token whose owner and
accessible repositories depend on the context in which the credential is used.
For example, when used in a multibranch project, the generated installation tokens will only allow access to the repository for the multibranch project itself. When used with an organization folder, each multibranch project will get an access token that is only valid for its own repository.
Note that some organization folder functionality (e.g. org scans) uses tokens that are not
limited to a specific repository, but these tokens should never be accessible in the context of a
Run
.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.jenkinsci.plugins.github_branch_source.app_credentials.RepositoryAccessStrategy
RepositoryAccessStrategy.RepositoryAccessStrategyDescriptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionforContext
(GitHubAppUsageContext context) Get theAccessibleRepositories
to use when generating installation access tokens for the inferred contextual owner and repository.Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
AccessInferredRepository
@DataBoundConstructor public AccessInferredRepository()
-
-
Method Details
-
forContext
Description copied from class:RepositoryAccessStrategy
Get theAccessibleRepositories
to use when generating installation access tokens for the inferred contextual owner and repository.Called when the credential is used in a context where an owner and repository can be inferred.
- Specified by:
forContext
in classRepositoryAccessStrategy
- Returns:
null
if the accessible repositories are unknown, or if no repositories are accessible in the specified context
-