Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.api.oauth
Interface OAuthService

    public interface OAuthService

The OAuthService provides methods useful for validating OAuth requests.

See Also:
  RFC 5849 for the OAuth specification.

Method Summary
`User` | `getCurrentUser()` Returns the `User` on whose behalf the request was made.
`User` | `getCurrentUser(java.lang.String scope)` Returns the `User` on whose behalf the request was made.
`java.lang.String` | `getOAuthConsumerKey()` Returns the oauth_consumer_key OAuth parameter from the request.
`boolean` | `isUserAdmin()` Returns true if the user on whose behalf the request was made is an admin for this application, false otherwise.

Method Detail

### getCurrentUser

    User getCurrentUser()
                        throws OAuthRequestException

  Returns the `User` on whose behalf the request was made.

  Throws:
    `OAuthRequestException` - If the request was not a valid OAuth request.
    `OAuthServiceFailureException` - If an unknown OAuth error occurred.

### getCurrentUser

    User getCurrentUser(java.lang.String scope)
                        throws OAuthRequestException

  Returns the `User` on whose behalf the request was made.

  Parameters:
    `scope` - The customs OAuth scope that is accepted.
  Throws:
    `OAuthRequestException` - If the request was not a valid OAuth request.
    `OAuthServiceFailureException` - If an unknown OAuth error occurred.

### isUserAdmin

    boolean isUserAdmin()
                        throws OAuthRequestException

  Returns true if the user on whose behalf the request was made is an admin for this application, false otherwise.

  Throws:
    `OAuthRequestException` - If the request was not a valid OAuth request.
    `OAuthServiceFailureException` - If an unknown OAuth error occurred.

### getOAuthConsumerKey

    java.lang.String getOAuthConsumerKey()
                                         throws OAuthRequestException

  Returns the oauth_consumer_key OAuth parameter from the request.

  Throws:
    `OAuthRequestException` - If the request was not a valid OAuth request.
    `OAuthServiceFailureException` - If an unknown OAuth error occurred.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD