org.eclipse.egit.github.core.service
Class OAuthService

java.lang.Object
  extended by org.eclipse.egit.github.core.service.GitHubService
      extended by org.eclipse.egit.github.core.service.OAuthService

public class OAuthService
extends GitHubService

Service for interacting with a user's OAUth authorizations

See Also:
GitHub OAuth API documentation

Field Summary
 
Fields inherited from class org.eclipse.egit.github.core.service.GitHubService
ACCEPT_FULL, ACCEPT_HTML, ACCEPT_TEXT, client
 
Constructor Summary
OAuthService()
          Create OAuth service
OAuthService(GitHubClient client)
          Create OAuth service
 
Method Summary
 Authorization addScopes(int id, Collection<String> scopes)
          Add scopes to authorization
 Authorization createAuthorization(Authorization authorization)
          Create authorization
 void deleteAuthorization(int id)
          Delete authorization with given id
 Authorization getAuthorization(int id)
          Get authorization with given id
 List<Authorization> getAuthorizations()
          Get all authorizations for currently authenticated user
 Authorization removeScopes(int id, Collection<String> scopes)
          Remove scopes from authorization
 Authorization setScopes(int id, Collection<String> scopes)
          Set scopes for authorization
 
Methods inherited from class org.eclipse.egit.github.core.service.GitHubService
check, createPagedRequest, createPagedRequest, createPageIterator, createRequest, getAll, getAll, getClient, getId, verifyRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthService

public OAuthService()
Create OAuth service


OAuthService

public OAuthService(GitHubClient client)
Create OAuth service

Parameters:
client -
Method Detail

getAuthorizations

public List<Authorization> getAuthorizations()
                                      throws IOException
Get all authorizations for currently authenticated user

Returns:
list of authorizations
Throws:
IOException

getAuthorization

public Authorization getAuthorization(int id)
                               throws IOException
Get authorization with given id

Parameters:
id -
Returns:
authorization
Throws:
IOException

deleteAuthorization

public void deleteAuthorization(int id)
                         throws IOException
Delete authorization with given id

Parameters:
id -
Throws:
IOException

createAuthorization

public Authorization createAuthorization(Authorization authorization)
                                  throws IOException
Create authorization

Parameters:
authorization -
Returns:
authorization
Throws:
IOException

addScopes

public Authorization addScopes(int id,
                               Collection<String> scopes)
                        throws IOException
Add scopes to authorization

Parameters:
id -
scopes -
Returns:
authorization
Throws:
IOException

removeScopes

public Authorization removeScopes(int id,
                                  Collection<String> scopes)
                           throws IOException
Remove scopes from authorization

Parameters:
id -
scopes -
Returns:
authorization
Throws:
IOException

setScopes

public Authorization setScopes(int id,
                               Collection<String> scopes)
                        throws IOException
Set scopes for authorization

Parameters:
id -
scopes -
Returns:
authorization
Throws:
IOException


Copyright © 2012. All Rights Reserved.