Class GitHubOAuth
- java.lang.Object
-
- jetbrains.buildServer.serverSide.oauth.github.GitHubOAuth
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GitHubOAuth.AccessTokenResponse
static class
GitHubOAuth.ErrorResponse
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.oauth.OAuthFlow
OAuthFlow.OAuthResult, OAuthFlow.UserData
-
-
Constructor Summary
Constructors Constructor Description GitHubOAuth(SSLTrustStoreProvider sslTrustStoreProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuthFlow.OAuthResult
completeOAuth(OAuthConnectionDescriptor opb, javax.servlet.http.HttpServletRequest request, String redirectUrl)
OAuthFlow.UserData
getUserData(OAuthConnectionDescriptor opb, String token, javax.servlet.http.HttpServletRequest request)
String
getUserLink(OAuthConnectionDescriptor opb, String username)
List<org.eclipse.egit.github.core.User>
getUserOrgs(String accessToken, OAuthConnectionDescriptor connectionDescriptor)
String
redirectToOAuthProvider(OAuthConnectionDescriptor connectionDescriptor, Map<String,String> stateParametrs, String scope, String redirectUri)
-
-
-
Constructor Detail
-
GitHubOAuth
public GitHubOAuth(@NotNull SSLTrustStoreProvider sslTrustStoreProvider)
-
-
Method Detail
-
redirectToOAuthProvider
@NotNull public String redirectToOAuthProvider(@NotNull OAuthConnectionDescriptor connectionDescriptor, @NotNull Map<String,String> stateParametrs, @Nullable String scope, @NotNull String redirectUri) throws OAuthException
- Specified by:
redirectToOAuthProvider
in interfaceOAuthFlow
- Throws:
OAuthException
-
completeOAuth
@NotNull public OAuthFlow.OAuthResult completeOAuth(@NotNull OAuthConnectionDescriptor opb, @NotNull javax.servlet.http.HttpServletRequest request, @NotNull String redirectUrl) throws OAuthException
- Specified by:
completeOAuth
in interfaceOAuthFlow
- Throws:
OAuthException
-
getUserData
@NotNull public OAuthFlow.UserData getUserData(@NotNull OAuthConnectionDescriptor opb, @NotNull String token, @NotNull javax.servlet.http.HttpServletRequest request)
- Specified by:
getUserData
in interfaceOAuthFlow
-
getUserLink
@NotNull public String getUserLink(@NotNull OAuthConnectionDescriptor opb, @NotNull String username)
- Specified by:
getUserLink
in interfaceOAuthFlow
-
getUserOrgs
@NotNull public List<org.eclipse.egit.github.core.User> getUserOrgs(@NotNull String accessToken, OAuthConnectionDescriptor connectionDescriptor) throws IOException
- Throws:
IOException
-
-