# turbo-garbanzo

> MCP Server

AppAuth for Android is a client SDK facilitating communication with OAuth 2.0 and OpenID Connect providers, mapping protocol flows and offering convenience methods for tasks like refreshing tokens.

## Overview

- **Category:** Developer Tools
- **Stars:** 35
- **Forks:** 4
- **Owner:** mercerheather476
- **GitHub:** https://github.com/mercerheather476/turbo-garbanzo
- **Created:** 2022-08-07T12:15:53+00:00
- **Updated:** 2025-03-13T06:29:33+00:00
- **Source:** https://model-context-protocol.com/servers/android-oauth-openid-connect-client-sdk

## Setup

## Setup

1.  **Download:** AppAuth for Android is available on [MavenCentral](https://search.maven.org/search?q=g:net.openid%20appauth)

    ```groovy
    implementation 'net.openid:appauth:<version>'
    ```

2.  **Requirements:** AppAuth supports Android API 16 (Jellybean) and above.
3.  **Custom URI Scheme Redirect:** Configure a distinct scheme using "reverse domain name notation".

    ```groovy
    android.defaultConfig.manifestPlaceholders = [
     'appAuthRedirectScheme': 'com.example.app'
    ]
    ```

4.  **Intent-Filter Configuration:** Alternatively, configure the redirect URI directly by adding an intent-filter for AppAuth's RedirectUriReceiverActivity to your AndroidManifest.xml.

    ```xml
    <activity
            android:name="net.openid.appauth.RedirectUriReceiverActivity"
            tools:node="replace">
        <intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <data android:scheme="com.example.app"/>
        </intent-filter>
    </activity>
    ```

5.  **HTTPS Redirect URI:** If an HTTPS redirect URI is required, modify your AndroidManifest.xml.

    ```xml
    <activity
            android:name="net.openid.appauth.RedirectUriReceiverActivity"
            tools:node="replace">
        <intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <data android:scheme="https"
                  android:host="app.example.com"
                  android:path="/oauth2redirect"/>
        </intent-filter>
    </activity>
    ```

6.  **Building from the Command line:** AppAuth for Android uses Gradle as its build system; run `./gradlew assemble` to build the library and app binaries.
7.  **Building from Android Studio:** In AndroidStudio, File -> New -> Import project and select the root folder.


## Tools

## Available Tools

1.  **AuthorizationServiceConfiguration:** Used to instruct AppAuth how to interact with the authorization service, either by directly creating an instance or retrieving an OpenID Connect discovery document.
2.  **AuthorizationRequest:** Used to construct an authorization request with parameters like client ID, response type, and redirect URI.
3.  **AuthorizationService:** Used to dispatch the AuthorizationRequest and TokenRequest.
4.  **AuthState:** Encapsulates the authorization state of the user and is designed to be easily persistable.
5.  **TokenRequest:** Used to exchange the authorization code for a refresh token.
6.  **performActionWithFreshTokens:** Utility method provided by AuthState to automatically refresh access tokens as necessary before performing actions that require valid tokens.
7.  **AppAuthConfiguration:** Provides advanced configuration options, such as controlling which browser is used for authorization and customizing the connection builder for HTTP requests.
8.  **RegistrationRequest:** Used for OAuth2 dynamic client registration.
9. **EndSessionRequest:** Used to end current session.
