Package

scalaoauth2

provider

Permalink

package provider

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. provider
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. case class AuthInfoRequest[A, U](authInfo: AuthInfo[U], request: Request[A]) extends WrappedRequest[A] with Product with Serializable

    Permalink
  2. case class AuthorizedActionFunction[U](handler: ProtectedResourceHandler[U])(implicit ctx: ExecutionContext) extends ActionFunction[Request, [A]AuthInfoRequest[A, U]] with OAuth2Provider with Product with Serializable

    Permalink
  3. trait OAuth2BaseProvider extends Results

    Permalink

    Basic OAuth2 provider trait.

  4. trait OAuth2Provider extends OAuth2BaseProvider

    Permalink

    OAuth2Provider supports issue access token and authorize.

    OAuth2Provider supports issue access token and authorize.

    Create controller for issue access token
    Examples:
    1. import scalaoauth2.provider._
      object BookController extends Controller with OAuthProvider {
        def list = Action.async { implicit request =>
          authorize(new MyDataHandler()) { authInfo =>
            val user = authInfo.user // User is defined on your system
            // access resource for the user
          }
        }
      }
    2. ,
    3. POST /oauth2/access_token controllers.OAuth2Controller.accessToken
      Authorized
    4. ,
    5. object OAuth2Controller extends Controller with OAuth2Provider {
        def accessToken = Action.async { implicit request =>
          issueAccessToken(new MyDataHandler())
        }
      }
      Register routes
  5. trait OAuth2ProviderActionBuilders extends AnyRef

    Permalink
  6. trait OAuth2AsyncProvider extends OAuth2Provider

    Permalink

    OAuth2AsyncProvider supports issue access token and authorize in asynchronous.

    OAuth2AsyncProvider supports issue access token and authorize in asynchronous.

    Create controller for issue access token
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use OAuth2Provider

    Examples:
    1. import scalaoauth2.provider._
      object BookController extends Controller with OAuth2AsyncProvider {
        def list = Action.async { implicit request =>
          authorize(new MyDataHandler()) { authInfo =>
            val user = authInfo.user // User is defined on your system
            // access resource for the user
          }
        }
      }
    2. ,
    3. POST /oauth2/access_token controllers.OAuth2Controller.accessToken
      Authorized
    4. ,
    5. object OAuth2Controller extends Controller with OAuth2AsyncProvider {
        def accessToken = Action.async { implicit request =>
          issueAccessToken(new MyDataHandler())
        }
      }
      Register routes

Deprecated Value Members

  1. def await(f: Future[Result], timeout: Duration = 60.seconds): Result

    Permalink

    Support synchronous Result for Playframework

    Support synchronous Result for Playframework

    Create controller for issue access token
    f

    callback

    timeout

    maximum wait time

    returns

    Await and return the result.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.13.0) Use Await in your own

    Examples:
    1. import scalaoauth2.provider._
      object BookController extends Controller with OAuthProvider {
        def list = Action { implicit request =>
          await(authorize(new MyDataHandler()) { authInfo =>
            val user = authInfo.user // User is defined on your system
            // access resource for the user
            Future.successful(Ok)
          })
        }
      }
    2. ,
    3. POST /oauth2/access_token controllers.OAuth2Controller.accessToken
      Authorized
    4. ,
    5. import scalaoauth2.provider._
      object OAuth2Controller extends Controller with OAuth2Provider {
        def accessToken = Action { implicit request =>
          await(issueAccessToken(new MyDataHandler()))
        }
      }
      Register routes

Inherited from AnyRef

Inherited from Any

Ungrouped