Class SecuritySchemeImpl

java.lang.Object
org.gcube.informationsystem.base.impl.ElementImpl
org.gcube.informationsystem.base.impl.properties.PropertyElementImpl
org.gcube.informationsystem.model.impl.properties.PropertyImpl
org.gcube.resourcemanagement.model.impl.properties.GCubePropertyImpl
org.gcube.resourcemanagement.model.impl.properties.SecuritySchemeImpl
All Implemented Interfaces:
Serializable, org.gcube.informationsystem.base.reference.Element, org.gcube.informationsystem.base.reference.properties.PropertyElement, org.gcube.informationsystem.base.reference.SchemaMixedElement, org.gcube.informationsystem.model.reference.ModelElement, org.gcube.informationsystem.model.reference.properties.Property, GCubeProperty, SecurityScheme
Direct Known Subclasses:
HTTPSecuritySchemeImpl

public class SecuritySchemeImpl extends GCubePropertyImpl implements SecurityScheme
Implementation of SecurityScheme.
Author:
Luca Frosini (ISTI - CNR)
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    The human-readable description of the security scheme
    protected String
    The specification defining the scheme
    protected String
    The name of the authentication mechanism
    protected URI
    Where the credentials are obtained or verified

    Fields inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl

    additionalProperties, allowedAdditionalKeys, expectedType, supertypes

    Fields inherited from interface org.gcube.informationsystem.base.reference.Element

    DATETIME_PATTERN, NAME, REDACTED, TYPE_PROPERTY, UNKNOWN_USER

    Fields inherited from interface org.gcube.resourcemanagement.model.reference.properties.GCubeProperty

    NAME

    Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement

    EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY

    Fields inherited from interface org.gcube.informationsystem.model.reference.properties.Property

    NAME

    Fields inherited from interface org.gcube.resourcemanagement.model.reference.properties.SecurityScheme

    DESCRIPTION_PROPERTY, NAME, REFERENCE_PROPERTY, SCHEME_PROPERTY, URL_PROPERTY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    A human-readable description of the security scheme, e.g.
    The specification defining the scheme, as cited by the registry of the extension, written as a Markdown link, e.g.
    The name of the authentication mechanism, taken from the registry of the framework the extension defines, e.g.
    Where the credentials are obtained or verified, e.g. the discovery document of the OpenID Connect provider issuing the tokens (OpenID Connect Discovery 1.0), such as https://accounts.d4science.org/auth/realms/d4science/.well-known/openid-configuration for the D4Science IAM, or the portal issuing API keys.
    void
    setDescription(String description)
    Sets the human-readable description of the security scheme
    void
    setReference(String reference)
    Sets the specification defining the scheme
    void
    setScheme(String scheme)
    Sets the name of the authentication mechanism
    void
    setURL(URI url)
    Sets where the credentials are obtained or verified

    Methods inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl

    addAllowedAdditionalKey, getAdditionalProperties, getAdditionalProperty, getExpectedType, getSupertypes, setAdditionalProperties, setAdditionalProperty

    Methods inherited from class org.gcube.informationsystem.base.impl.ElementImpl

    getTypeName, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.gcube.informationsystem.base.reference.Element

    getTypeName

    Methods inherited from interface org.gcube.informationsystem.model.reference.ModelElement

    getExpectedType, getSupertypes

    Methods inherited from interface org.gcube.informationsystem.model.reference.properties.Property

    getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
  • Field Details

    • scheme

      protected String scheme
      The name of the authentication mechanism
    • reference

      protected String reference
      The specification defining the scheme
    • url

      protected URI url
      Where the credentials are obtained or verified
    • description

      protected String description
      The human-readable description of the security scheme
  • Constructor Details

    • SecuritySchemeImpl

      public SecuritySchemeImpl()
      Default constructor
  • Method Details

    • getScheme

      public String getScheme()
      The name of the authentication mechanism, taken from the registry of the framework the extension defines, e.g. Bearer for an HTTPSecurityScheme (IANA HTTP Authentication Scheme Registry).
      Specified by:
      getScheme in interface SecurityScheme
      Returns:
      the name of the authentication mechanism
    • setScheme

      public void setScheme(String scheme)
      Sets the name of the authentication mechanism
      Specified by:
      setScheme in interface SecurityScheme
      Parameters:
      scheme - the name of the authentication mechanism, e.g. Bearer
    • getReference

      public String getReference()
      The specification defining the scheme, as cited by the registry of the extension, written as a Markdown link, e.g. [RFC 6750](https://www.rfc-editor.org/rfc/rfc6750) or [RFC 9449, Section 7.1](https://www.rfc-editor.org/rfc/rfc9449#section-7.1); plain text when there is no link.
      Specified by:
      getReference in interface SecurityScheme
      Returns:
      the specification defining the scheme
    • setReference

      public void setReference(String reference)
      Sets the specification defining the scheme
      Specified by:
      setReference in interface SecurityScheme
      Parameters:
      reference - the specification defining the scheme, as a Markdown link
    • getURL

      public URI getURL()
      Where the credentials are obtained or verified, e.g. the discovery document of the OpenID Connect provider issuing the tokens (OpenID Connect Discovery 1.0), such as https://accounts.d4science.org/auth/realms/d4science/.well-known/openid-configuration for the D4Science IAM, or the portal issuing API keys.
      Specified by:
      getURL in interface SecurityScheme
      Returns:
      where the credentials are obtained or verified
    • setURL

      public void setURL(URI url)
      Sets where the credentials are obtained or verified
      Specified by:
      setURL in interface SecurityScheme
      Parameters:
      url - where the credentials are obtained or verified, e.g. the OpenID Connect discovery document of the issuer
    • getDescription

      public String getDescription()
      A human-readable description of the security scheme, e.g. Tokens issued by the D4Science IAM for the Context of the call.
      Specified by:
      getDescription in interface SecurityScheme
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Sets the human-readable description of the security scheme
      Specified by:
      setDescription in interface SecurityScheme
      Parameters:
      description - the description