Skip to content

Commit

Permalink
deploy: 63f59d3
Browse files Browse the repository at this point in the history
  • Loading branch information
openEO CI committed Jul 11, 2024
1 parent 5bc1dc2 commit 8fcfe3b
Show file tree
Hide file tree
Showing 65 changed files with 72,986 additions and 0 deletions.
1,500 changes: 1,500 additions & 0 deletions 2.6.0/AuthProvider.html

Large diffs are not rendered by default.

1,555 changes: 1,555 additions & 0 deletions 2.6.0/BaseEntity.html

Large diffs are not rendered by default.

1,547 changes: 1,547 additions & 0 deletions 2.6.0/BasicProvider.html

Large diffs are not rendered by default.

3,417 changes: 3,417 additions & 0 deletions 2.6.0/Builder.html

Large diffs are not rendered by default.

2,115 changes: 2,115 additions & 0 deletions 2.6.0/BuilderNode.html

Large diffs are not rendered by default.

1,853 changes: 1,853 additions & 0 deletions 2.6.0/Capabilities.html

Large diffs are not rendered by default.

11,173 changes: 11,173 additions & 0 deletions 2.6.0/Connection.html

Large diffs are not rendered by default.

4,343 changes: 4,343 additions & 0 deletions 2.6.0/Environment.html

Large diffs are not rendered by default.

1,188 changes: 1,188 additions & 0 deletions 2.6.0/FileTypes.html

Large diffs are not rendered by default.

1,317 changes: 1,317 additions & 0 deletions 2.6.0/Formula.html

Large diffs are not rendered by default.

4,203 changes: 4,203 additions & 0 deletions 2.6.0/Job.html

Large diffs are not rendered by default.

719 changes: 719 additions & 0 deletions 2.6.0/Logs.html

Large diffs are not rendered by default.

4,181 changes: 4,181 additions & 0 deletions 2.6.0/OidcProvider.html

Large diffs are not rendered by default.

728 changes: 728 additions & 0 deletions 2.6.0/OpenEO.html

Large diffs are not rendered by default.

708 changes: 708 additions & 0 deletions 2.6.0/Parameter.html

Large diffs are not rendered by default.

3,587 changes: 3,587 additions & 0 deletions 2.6.0/Service.html

Large diffs are not rendered by default.

2,523 changes: 2,523 additions & 0 deletions 2.6.0/UserFile.html

Large diffs are not rendered by default.

2,971 changes: 2,971 additions & 0 deletions 2.6.0/UserProcess.html

Large diffs are not rendered by default.

198 changes: 198 additions & 0 deletions 2.6.0/authprovider.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: authprovider.js</title>

<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

<h1 class="page-title">Source: authprovider.js</h1>






<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* The base class for authentication providers such as Basic and OpenID Connect.
*
* @abstract
*/
class AuthProvider {

/**
* Creates a new OidcProvider instance to authenticate using OpenID Connect.
*
* @param {string} type - The type of the authentication procedure as specified by the API, e.g. `oidc` or `basic`.
* @param {Connection} connection - A Connection object representing an established connection to an openEO back-end.
* @param {AuthProviderMeta} options - Options
*/
constructor(type, connection, options) {
this.id = options.id || null;
this.title = options.title || "";
this.description = options.description || "";
this.type = type;
/**
* @protected
* @type {Connection}
*/
this.connection = connection;
this.token = null;
}

/**
* Get an identifier for the auth provider (combination of the type + provider identifier).
*
* @returns {string}
*/
getId() {
let id = this.getType();
if (this.getProviderId().length > 0) {
id += '.' + this.getProviderId();
}
return id;
}

/**
* Returns a display name for the authenticated user.
*
* @returns {string?} Name of the user or `null`
*/
getDisplayName() {
return null;
}

/**
* Returns the type of the authentication procedure as specified by the API, e.g. `oidc` or `basic`.
*
* @returns {string}
*/
getType() {
return this.type;
}

/**
* Returns the provider identifier, may not be available for all authentication methods.
*
* @returns {string}
*/
getProviderId() {
return typeof this.id === 'string' ? this.id : "";
}

/**
* Returns the human-readable title for the authentication method / provider.
*
* @returns {string}
*/
getTitle() {
return this.title;
}

/**
* Returns the human-readable description for the authentication method / provider.
*
* @returns {string}
*/
getDescription() {
return this.description;
}

/**
* Returns the access token that is used as Bearer Token in API requests.
*
* Returns `null` if no access token has been set yet (i.e. not authenticated any longer).
*
* @returns {string | null}
*/
getToken() {
if (typeof this.token === 'string') {
return this.getType() + "/" + this.getProviderId() + "/" + this.token;
}
else {
return null;
}
}

/**
* Sets the access token that is used as Bearer Token in API requests.
*
* Set to `null` to remove the access token.
*
* This also manages which auth provider is set for the connection.
*
* @param {?string} token
*/
setToken(token) {
this.token = token;
this.connection.emit('tokenChanged', token);
if (this.token !== null) {
this.connection.setAuthProvider(this);
}
else {
this.connection.setAuthProvider(null);
}
}

/**
* Abstract method that extending classes implement the login process with.
*
* @async
* @param {...*} args
* @throws {Error}
*/
async login(...args) {
throw new Error("Not implemented.", args);
}

/**
* Logout from the established session.
*
* This is experimental and just removes the token for now.
* May need to be overridden by sub-classes.
*
* @async
*/
async logout() {
this.setToken(null);
}

}

module.exports = AuthProvider;
</code></pre>
</article>
</section>




</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AuthProvider.html">AuthProvider</a></li><li><a href="BaseEntity.html">BaseEntity</a></li><li><a href="BasicProvider.html">BasicProvider</a></li><li><a href="Builder.html">Builder</a></li><li><a href="BuilderNode.html">BuilderNode</a></li><li><a href="Capabilities.html">Capabilities</a></li><li><a href="Connection.html">Connection</a></li><li><a href="Environment.html">Environment</a></li><li><a href="FileTypes.html">FileTypes</a></li><li><a href="Formula.html">Formula</a></li><li><a href="Job.html">Job</a></li><li><a href="Logs.html">Logs</a></li><li><a href="OidcProvider.html">OidcProvider</a></li><li><a href="OpenEO.html">OpenEO</a></li><li><a href="Parameter.html">Parameter</a></li><li><a href="Service.html">Service</a></li><li><a href="UserFile.html">UserFile</a></li><li><a href="UserProcess.html">UserProcess</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.3</a> on Thu Jul 11 2024 13:43:03 GMT+0000 (Coordinated Universal Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
Loading

0 comments on commit 8fcfe3b

Please sign in to comment.