Irurueta BFF API

Documents

deleteDocument

Deletes a document

Deletes one of the signed-in user's documents; an administrator may delete any. The BFF asks the resource server (DELETE /api/documents/{id} there, which needs the scope documents.delete and a recent strong authentication) with the access token of the session. Someone else's document is answered 404, like a missing one. A state-changing request: it needs the CSRF token.


/api/documents/{id}

Usage and SDK Samples

curl -X DELETE \
 \
-H "X-XSRF-TOKEN: [[apiKey]]" \
 -H "Accept: application/problem+json,application/json" \
 "http://localhost:8080/api/documents/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DocumentsApi;

import java.io.File;
import java.util.*;

public class DocumentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: session
        ApiKeyAuth session = (ApiKeyAuth) defaultClient.getAuthentication("session");
        session.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //session.setApiKeyPrefix("Token");

        // Configure API key authorization: csrf
        ApiKeyAuth csrf = (ApiKeyAuth) defaultClient.getAuthentication("csrf");
        csrf.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //csrf.setApiKeyPrefix("Token");

        // Create an instance of the API class
        DocumentsApi apiInstance = new DocumentsApi();
        String id = id_example; // String | Unique identifier of the document.

        try {
            apiInstance.deleteDocument(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling DocumentsApi#deleteDocument");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | Unique identifier of the document.

try {
    final result = await api_instance.deleteDocument(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteDocument: $e\n');
}

import org.openapitools.client.api.DocumentsApi;

public class DocumentsApiExample {
    public static void main(String[] args) {
        DocumentsApi apiInstance = new DocumentsApi();
        String id = id_example; // String | Unique identifier of the document.

        try {
            apiInstance.deleteDocument(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling DocumentsApi#deleteDocument");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: session)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"__Host-SESSION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"__Host-SESSION"];

// Configure API key authorization: (authentication scheme: csrf)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-XSRF-TOKEN"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-XSRF-TOKEN"];


// Create an instance of the API class
DocumentsApi *apiInstance = [[DocumentsApi alloc] init];
String *id = id_example; // Unique identifier of the document. (default to null)

// Deletes a document
[apiInstance deleteDocumentWith:id
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var IruruetaBffApi = require('irurueta_bff_api');
var defaultClient = IruruetaBffApi.ApiClient.instance;

// Configure API key authorization: session
var session = defaultClient.authentications['session'];
session.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//session.apiKeyPrefix['__Host-SESSION'] = "Token";

// Configure API key authorization: csrf
var csrf = defaultClient.authentications['csrf'];
csrf.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//csrf.apiKeyPrefix['X-XSRF-TOKEN'] = "Token";

// Create an instance of the API class
var api = new IruruetaBffApi.DocumentsApi()
var id = id_example; // {String} Unique identifier of the document.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteDocument(id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteDocumentExample
    {
        public void main()
        {
            // Configure API key authorization: session
            Configuration.Default.ApiKey.Add("__Host-SESSION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("__Host-SESSION", "Bearer");
            // Configure API key authorization: csrf
            Configuration.Default.ApiKey.Add("X-XSRF-TOKEN", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-XSRF-TOKEN", "Bearer");

            // Create an instance of the API class
            var apiInstance = new DocumentsApi();
            var id = id_example;  // String | Unique identifier of the document. (default to null)

            try {
                // Deletes a document
                apiInstance.deleteDocument(id);
            } catch (Exception e) {
                Debug.Print("Exception when calling DocumentsApi.deleteDocument: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: session
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('__Host-SESSION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('__Host-SESSION', 'Bearer');

// Configure API key authorization: csrf
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-XSRF-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-XSRF-TOKEN', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DocumentsApi();
$id = id_example; // String | Unique identifier of the document.

try {
    $api_instance->deleteDocument($id);
} catch (Exception $e) {
    echo 'Exception when calling DocumentsApi->deleteDocument: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DocumentsApi;

# Configure API key authorization: session
$WWW::OPenAPIClient::Configuration::api_key->{'__Host-SESSION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'__Host-SESSION'} = "Bearer";

# Configure API key authorization: csrf
$WWW::OPenAPIClient::Configuration::api_key->{'X-XSRF-TOKEN'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-XSRF-TOKEN'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DocumentsApi->new();
my $id = id_example; # String | Unique identifier of the document.

eval {
    $api_instance->deleteDocument(id => $id);
};
if ($@) {
    warn "Exception when calling DocumentsApi->deleteDocument: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: session
openapi_client.configuration.api_key['__Host-SESSION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['__Host-SESSION'] = 'Bearer'

# Configure API key authorization: csrf
openapi_client.configuration.api_key['X-XSRF-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-XSRF-TOKEN'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.DocumentsApi()
id = id_example # String | Unique identifier of the document. (default to null)

try:
    # Deletes a document
    api_instance.delete_document(id)
except ApiException as e:
    print("Exception when calling DocumentsApi->deleteDocument: %s\n" % e)
extern crate DocumentsApi;

pub fn main() {
    let id = id_example; // String

    let mut context = DocumentsApi::Context::default();
    let result = client.deleteDocument(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
Unique identifier of the document.
Required

Responses


listDocuments

Lists documents

Lists the documents of the signed-in user; an administrator sees all. The BFF asks the resource server (GET /api/documents there, which needs the scope documents.read) with the access token of the session, renewing it with the refresh token when it expired.


/api/documents

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8080/api/documents"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DocumentsApi;

import java.io.File;
import java.util.*;

public class DocumentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: session
        ApiKeyAuth session = (ApiKeyAuth) defaultClient.getAuthentication("session");
        session.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //session.setApiKeyPrefix("Token");

        // Create an instance of the API class
        DocumentsApi apiInstance = new DocumentsApi();

        try {
            array[DocumentResponse] result = apiInstance.listDocuments();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DocumentsApi#listDocuments");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.listDocuments();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listDocuments: $e\n');
}

import org.openapitools.client.api.DocumentsApi;

public class DocumentsApiExample {
    public static void main(String[] args) {
        DocumentsApi apiInstance = new DocumentsApi();

        try {
            array[DocumentResponse] result = apiInstance.listDocuments();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DocumentsApi#listDocuments");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: session)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"__Host-SESSION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"__Host-SESSION"];


// Create an instance of the API class
DocumentsApi *apiInstance = [[DocumentsApi alloc] init];

// Lists documents
[apiInstance listDocumentsWithCompletionHandler: 
              ^(array[DocumentResponse] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var IruruetaBffApi = require('irurueta_bff_api');
var defaultClient = IruruetaBffApi.ApiClient.instance;

// Configure API key authorization: session
var session = defaultClient.authentications['session'];
session.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//session.apiKeyPrefix['__Host-SESSION'] = "Token";

// Create an instance of the API class
var api = new IruruetaBffApi.DocumentsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listDocuments(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listDocumentsExample
    {
        public void main()
        {
            // Configure API key authorization: session
            Configuration.Default.ApiKey.Add("__Host-SESSION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("__Host-SESSION", "Bearer");

            // Create an instance of the API class
            var apiInstance = new DocumentsApi();

            try {
                // Lists documents
                array[DocumentResponse] result = apiInstance.listDocuments();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DocumentsApi.listDocuments: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: session
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('__Host-SESSION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('__Host-SESSION', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DocumentsApi();

try {
    $result = $api_instance->listDocuments();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentsApi->listDocuments: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DocumentsApi;

# Configure API key authorization: session
$WWW::OPenAPIClient::Configuration::api_key->{'__Host-SESSION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'__Host-SESSION'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DocumentsApi->new();

eval {
    my $result = $api_instance->listDocuments();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DocumentsApi->listDocuments: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: session
openapi_client.configuration.api_key['__Host-SESSION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['__Host-SESSION'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.DocumentsApi()

try:
    # Lists documents
    api_response = api_instance.list_documents()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DocumentsApi->listDocuments: %s\n" % e)
extern crate DocumentsApi;

pub fn main() {

    let mut context = DocumentsApi::Context::default();
    let result = client.listDocuments(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


Login

login

Starts the login

Redirects the browser to the OpenID Connect authorization request of the authorization server. Once the user has signed in, the BFF sends the browser back to returnTo (or to the root of the application when it is absent). The SPA navigates to this endpoint; it is not called through fetch.


/bff/login

Usage and SDK Samples

curl -X GET \
 "http://localhost:8080/bff/login?returnTo=returnTo_example&acrValues=acrValues_example&maxAge=789"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LoginApi;

import java.io.File;
import java.util.*;

public class LoginApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        LoginApi apiInstance = new LoginApi();
        String returnTo = returnTo_example; // String | Relative path (with an optional query string) of the SPA page to return to after the login. It must be one of the paths listed in bff.login.allowed-return-paths; anything else (absolute URLs, scheme-relative URLs starting with //, backslashes, control characters) is rejected to prevent open redirects.
        String acrValues = acrValues_example; // String | Space-separated authentication context class references the authorization server must satisfy, sent as the acr_values parameter of the authorization request. The SPA copies it from the acrValues of a step-up-required problem (RFC 9470) so the user signs in again with a strong enough authentication. Absent, the authorization request carries no acr_values.
        Long maxAge = 789; // Long | Maximum age, in seconds, of the user's authentication, sent as the max_age parameter of the authorization request: an older sign-in makes the authorization server ask the user to authenticate again. The SPA copies it from the maxAge of a step-up-required problem. Absent, the authorization request carries no max_age.

        try {
            apiInstance.login(returnTo, acrValues, maxAge);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#login");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String returnTo = new String(); // String | Relative path (with an optional query string) of the SPA page to return to after the login. It must be one of the paths listed in bff.login.allowed-return-paths; anything else (absolute URLs, scheme-relative URLs starting with //, backslashes, control characters) is rejected to prevent open redirects.
final String acrValues = new String(); // String | Space-separated authentication context class references the authorization server must satisfy, sent as the acr_values parameter of the authorization request. The SPA copies it from the acrValues of a step-up-required problem (RFC 9470) so the user signs in again with a strong enough authentication. Absent, the authorization request carries no acr_values.
final Long maxAge = new Long(); // Long | Maximum age, in seconds, of the user's authentication, sent as the max_age parameter of the authorization request: an older sign-in makes the authorization server ask the user to authenticate again. The SPA copies it from the maxAge of a step-up-required problem. Absent, the authorization request carries no max_age.

try {
    final result = await api_instance.login(returnTo, acrValues, maxAge);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->login: $e\n');
}

import org.openapitools.client.api.LoginApi;

public class LoginApiExample {
    public static void main(String[] args) {
        LoginApi apiInstance = new LoginApi();
        String returnTo = returnTo_example; // String | Relative path (with an optional query string) of the SPA page to return to after the login. It must be one of the paths listed in bff.login.allowed-return-paths; anything else (absolute URLs, scheme-relative URLs starting with //, backslashes, control characters) is rejected to prevent open redirects.
        String acrValues = acrValues_example; // String | Space-separated authentication context class references the authorization server must satisfy, sent as the acr_values parameter of the authorization request. The SPA copies it from the acrValues of a step-up-required problem (RFC 9470) so the user signs in again with a strong enough authentication. Absent, the authorization request carries no acr_values.
        Long maxAge = 789; // Long | Maximum age, in seconds, of the user's authentication, sent as the max_age parameter of the authorization request: an older sign-in makes the authorization server ask the user to authenticate again. The SPA copies it from the maxAge of a step-up-required problem. Absent, the authorization request carries no max_age.

        try {
            apiInstance.login(returnTo, acrValues, maxAge);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#login");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
LoginApi *apiInstance = [[LoginApi alloc] init];
String *returnTo = returnTo_example; // Relative path (with an optional query string) of the SPA page to return to after the login. It must be one of the paths listed in bff.login.allowed-return-paths; anything else (absolute URLs, scheme-relative URLs starting with //, backslashes, control characters) is rejected to prevent open redirects. (optional) (default to null)
String *acrValues = acrValues_example; // Space-separated authentication context class references the authorization server must satisfy, sent as the acr_values parameter of the authorization request. The SPA copies it from the acrValues of a step-up-required problem (RFC 9470) so the user signs in again with a strong enough authentication. Absent, the authorization request carries no acr_values. (optional) (default to null)
Long *maxAge = 789; // Maximum age, in seconds, of the user's authentication, sent as the max_age parameter of the authorization request: an older sign-in makes the authorization server ask the user to authenticate again. The SPA copies it from the maxAge of a step-up-required problem. Absent, the authorization request carries no max_age. (optional) (default to null)

// Starts the login
[apiInstance loginWith:returnTo
    acrValues:acrValues
    maxAge:maxAge
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var IruruetaBffApi = require('irurueta_bff_api');

// Create an instance of the API class
var api = new IruruetaBffApi.LoginApi()
var opts = {
  'returnTo': returnTo_example, // {String} Relative path (with an optional query string) of the SPA page to return to after the login. It must be one of the paths listed in bff.login.allowed-return-paths; anything else (absolute URLs, scheme-relative URLs starting with //, backslashes, control characters) is rejected to prevent open redirects.
  'acrValues': acrValues_example, // {String} Space-separated authentication context class references the authorization server must satisfy, sent as the acr_values parameter of the authorization request. The SPA copies it from the acrValues of a step-up-required problem (RFC 9470) so the user signs in again with a strong enough authentication. Absent, the authorization request carries no acr_values.
  'maxAge': 789 // {Long} Maximum age, in seconds, of the user's authentication, sent as the max_age parameter of the authorization request: an older sign-in makes the authorization server ask the user to authenticate again. The SPA copies it from the maxAge of a step-up-required problem. Absent, the authorization request carries no max_age.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.login(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class loginExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new LoginApi();
            var returnTo = returnTo_example;  // String | Relative path (with an optional query string) of the SPA page to return to after the login. It must be one of the paths listed in bff.login.allowed-return-paths; anything else (absolute URLs, scheme-relative URLs starting with //, backslashes, control characters) is rejected to prevent open redirects. (optional)  (default to null)
            var acrValues = acrValues_example;  // String | Space-separated authentication context class references the authorization server must satisfy, sent as the acr_values parameter of the authorization request. The SPA copies it from the acrValues of a step-up-required problem (RFC 9470) so the user signs in again with a strong enough authentication. Absent, the authorization request carries no acr_values. (optional)  (default to null)
            var maxAge = 789;  // Long | Maximum age, in seconds, of the user's authentication, sent as the max_age parameter of the authorization request: an older sign-in makes the authorization server ask the user to authenticate again. The SPA copies it from the maxAge of a step-up-required problem. Absent, the authorization request carries no max_age. (optional)  (default to null)

            try {
                // Starts the login
                apiInstance.login(returnTo, acrValues, maxAge);
            } catch (Exception e) {
                Debug.Print("Exception when calling LoginApi.login: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LoginApi();
$returnTo = returnTo_example; // String | Relative path (with an optional query string) of the SPA page to return to after the login. It must be one of the paths listed in bff.login.allowed-return-paths; anything else (absolute URLs, scheme-relative URLs starting with //, backslashes, control characters) is rejected to prevent open redirects.
$acrValues = acrValues_example; // String | Space-separated authentication context class references the authorization server must satisfy, sent as the acr_values parameter of the authorization request. The SPA copies it from the acrValues of a step-up-required problem (RFC 9470) so the user signs in again with a strong enough authentication. Absent, the authorization request carries no acr_values.
$maxAge = 789; // Long | Maximum age, in seconds, of the user's authentication, sent as the max_age parameter of the authorization request: an older sign-in makes the authorization server ask the user to authenticate again. The SPA copies it from the maxAge of a step-up-required problem. Absent, the authorization request carries no max_age.

try {
    $api_instance->login($returnTo, $acrValues, $maxAge);
} catch (Exception $e) {
    echo 'Exception when calling LoginApi->login: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LoginApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LoginApi->new();
my $returnTo = returnTo_example; # String | Relative path (with an optional query string) of the SPA page to return to after the login. It must be one of the paths listed in bff.login.allowed-return-paths; anything else (absolute URLs, scheme-relative URLs starting with //, backslashes, control characters) is rejected to prevent open redirects.
my $acrValues = acrValues_example; # String | Space-separated authentication context class references the authorization server must satisfy, sent as the acr_values parameter of the authorization request. The SPA copies it from the acrValues of a step-up-required problem (RFC 9470) so the user signs in again with a strong enough authentication. Absent, the authorization request carries no acr_values.
my $maxAge = 789; # Long | Maximum age, in seconds, of the user's authentication, sent as the max_age parameter of the authorization request: an older sign-in makes the authorization server ask the user to authenticate again. The SPA copies it from the maxAge of a step-up-required problem. Absent, the authorization request carries no max_age.

eval {
    $api_instance->login(returnTo => $returnTo, acrValues => $acrValues, maxAge => $maxAge);
};
if ($@) {
    warn "Exception when calling LoginApi->login: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.LoginApi()
returnTo = returnTo_example # String | Relative path (with an optional query string) of the SPA page to return to after the login. It must be one of the paths listed in bff.login.allowed-return-paths; anything else (absolute URLs, scheme-relative URLs starting with //, backslashes, control characters) is rejected to prevent open redirects. (optional) (default to null)
acrValues = acrValues_example # String | Space-separated authentication context class references the authorization server must satisfy, sent as the acr_values parameter of the authorization request. The SPA copies it from the acrValues of a step-up-required problem (RFC 9470) so the user signs in again with a strong enough authentication. Absent, the authorization request carries no acr_values. (optional) (default to null)
maxAge = 789 # Long | Maximum age, in seconds, of the user's authentication, sent as the max_age parameter of the authorization request: an older sign-in makes the authorization server ask the user to authenticate again. The SPA copies it from the maxAge of a step-up-required problem. Absent, the authorization request carries no max_age. (optional) (default to null)

try:
    # Starts the login
    api_instance.login(returnTo=returnTo, acrValues=acrValues, maxAge=maxAge)
except ApiException as e:
    print("Exception when calling LoginApi->login: %s\n" % e)
extern crate LoginApi;

pub fn main() {
    let returnTo = returnTo_example; // String
    let acrValues = acrValues_example; // String
    let maxAge = 789; // Long

    let mut context = LoginApi::Context::default();
    let result = client.login(returnTo, acrValues, maxAge, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
returnTo
String
Relative path (with an optional query string) of the SPA page to return to after the login. It must be one of the paths listed in bff.login.allowed-return-paths; anything else (absolute URLs, scheme-relative URLs starting with //, backslashes, control characters) is rejected to prevent open redirects.
acrValues
String
Space-separated authentication context class references the authorization server must satisfy, sent as the acr_values parameter of the authorization request. The SPA copies it from the acrValues of a step-up-required problem (RFC 9470) so the user signs in again with a strong enough authentication. Absent, the authorization request carries no acr_values.
maxAge
Long (int64)
Maximum age, in seconds, of the user's authentication, sent as the max_age parameter of the authorization request: an older sign-in makes the authorization server ask the user to authenticate again. The SPA copies it from the maxAge of a step-up-required problem. Absent, the authorization request carries no max_age.

Responses

Name Type Format Description
Location String URL of the authorization request, /oauth2/authorization/bff


User

getSessionUser

Returns the signed-in user

Answers the user signed in to the BFF session, as UI-safe claims of its ID token. Tokens are never part of the response: they stay on the server.


/bff/user

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/json" \
 "http://localhost:8080/bff/user"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserApi;

import java.io.File;
import java.util.*;

public class UserApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: session
        ApiKeyAuth session = (ApiKeyAuth) defaultClient.getAuthentication("session");
        session.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //session.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserApi apiInstance = new UserApi();

        try {
            SessionUserResponse result = apiInstance.getSessionUser();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getSessionUser");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.getSessionUser();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getSessionUser: $e\n');
}

import org.openapitools.client.api.UserApi;

public class UserApiExample {
    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();

        try {
            SessionUserResponse result = apiInstance.getSessionUser();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getSessionUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: session)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"__Host-SESSION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"__Host-SESSION"];


// Create an instance of the API class
UserApi *apiInstance = [[UserApi alloc] init];

// Returns the signed-in user
[apiInstance getSessionUserWithCompletionHandler: 
              ^(SessionUserResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var IruruetaBffApi = require('irurueta_bff_api');
var defaultClient = IruruetaBffApi.ApiClient.instance;

// Configure API key authorization: session
var session = defaultClient.authentications['session'];
session.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//session.apiKeyPrefix['__Host-SESSION'] = "Token";

// Create an instance of the API class
var api = new IruruetaBffApi.UserApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSessionUser(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getSessionUserExample
    {
        public void main()
        {
            // Configure API key authorization: session
            Configuration.Default.ApiKey.Add("__Host-SESSION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("__Host-SESSION", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserApi();

            try {
                // Returns the signed-in user
                SessionUserResponse result = apiInstance.getSessionUser();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserApi.getSessionUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: session
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('__Host-SESSION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('__Host-SESSION', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserApi();

try {
    $result = $api_instance->getSessionUser();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->getSessionUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserApi;

# Configure API key authorization: session
$WWW::OPenAPIClient::Configuration::api_key->{'__Host-SESSION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'__Host-SESSION'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserApi->new();

eval {
    my $result = $api_instance->getSessionUser();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->getSessionUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: session
openapi_client.configuration.api_key['__Host-SESSION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['__Host-SESSION'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserApi()

try:
    # Returns the signed-in user
    api_response = api_instance.get_session_user()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->getSessionUser: %s\n" % e)
extern crate UserApi;

pub fn main() {

    let mut context = UserApi::Context::default();
    let result = client.getSessionUser(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses