
<div class="container fusio-login-container">
    <h1>Authorization</h1>
    <div uib-alert ng-class="'alert-danger'" ng-if="error">
        {{error}}
    </div>
    <div uib-alert ng-class="'alert-info'" ng-if="info">
        {{info}}
    </div>

    <div ng-if="response.code">
        <div uib-alert ng-class="'alert-info'">
            You have granted the application access. Provide the following
            authorization code in order to complete the authentication process.
        </div>
        <p><b>Authorization code:</b></p>
        <div class="fusio-code">{{ response.code }}</div>
    </div>

    <div ng-if="app.name && !response.code && !info">
        <p><a href="{{ app.url }}">{{ app.name }}</a> is requesting permission to access:</p>
        <ul>
            <li ng-repeat="scope in app.scopes"><b>{{ scope.description }}</b></li>
        </ul>
        <hr>
        <div>
            <button ng-click="submitAccess(1)" class="btn btn-primary">Allow Access</button>
            <button ng-click="submitAccess(0)" class="btn btn-default">No thanks</button>
        </div>
    </div>
</div>
