Struct activitypub::Endpoint [−][src]
pub struct Endpoint { pub proxy_url: Option<Value>, pub oauth_authorization_endpoint: Option<Value>, pub oauth_token_endpoint: Option<Value>, pub provide_client_key: Option<Value>, pub sign_client_key: Option<Value>, pub shared_inbox: Option<Value>, }
A json object which maps additional (typically server/domain-wide) endpoints which may be useful either for this actor or someone referencing this actor.
This mapping may be nested inside the actor document as the value or may be a link to a JSON-LD document with these properties.
Fields
proxy_url: Option<Value>
Endpoint URI so this actor's clients may access remote ActivityStreams objects which require authentication to access.
To use this endpoint, the client posts an x-www-form-urlencoded id parameter with the value being the id of the requested ActivityStreams object.
- Range:
anyUri
- Functional: true
If OAuth 2.0 bearer tokens [RFC6749] [RFC6750] are being used for authenticating client to server interactions, this endpoint specifies a URI at which a browser-authenticated user may obtain a new authorization grant.
- Range:
anyUri
- Functional: true
oauth_token_endpoint: Option<Value>
If OAuth 2.0 bearer tokens [RFC6749] [RFC6750] are being used for authenticating client to server interactions, this endpoint specifies a URI at which a client may acquire an access token.
- Range:
anyUri
- Functional: true
provide_client_key: Option<Value>
If Linked Data Signatures and HTTP Signatures are being used for authentication and authorization, this endpoint specifies a URI at which browser-authenticated users may authorize a client's public key for client to server interactions.
- Range:
anyUri
- Functional: true
sign_client_key: Option<Value>
If Linked Data Signatures and HTTP Signatures are being used for authentication and authorization, this endpoint specifies a URI at which a client key may be signed by the actor's key for a time window to act on behalf of the actor in interacting with foreign servers.
- Range:
anyUri
- Functional: true
An optional endpoint used for wide delivery of publicly addressed activities and activities sent to followers.
shared_inbox
endpoints SHOULD also be publicly readable OrderedCollection
objects
containing objects addressed to the Public special collection. Reading from the
shared_inbox
endpoint MUST NOT present objects which are not addressed to the Public
endpoint.
- Range:
anyUri
- Functional: true
Methods
impl Endpoint
[src]
impl Endpoint
pub fn proxy_url_string(&self) -> Result<String>
[src]
pub fn proxy_url_string(&self) -> Result<String>
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_proxy_url_string(&mut self, item: String) -> Result<()>
[src]
pub fn set_proxy_url_string(&mut self, item: String) -> Result<()>
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
pub fn proxy_url_string_vec(&self) -> Result<Vec<String>>
[src]
pub fn proxy_url_string_vec(&self) -> Result<Vec<String>>
Retrieve many values from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_proxy_url_string_vec(&mut self, item: Vec<String>) -> Result<()>
[src]
pub fn set_proxy_url_string_vec(&mut self, item: Vec<String>) -> Result<()>
Set many values in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Retrieve many values from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
Set many values in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
pub fn oauth_token_endpoint_string(&self) -> Result<String>
[src]
pub fn oauth_token_endpoint_string(&self) -> Result<String>
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_oauth_token_endpoint_string(&mut self, item: String) -> Result<()>
[src]
pub fn set_oauth_token_endpoint_string(&mut self, item: String) -> Result<()>
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
pub fn oauth_token_endpoint_string_vec(&self) -> Result<Vec<String>>
[src]
pub fn oauth_token_endpoint_string_vec(&self) -> Result<Vec<String>>
Retrieve many values from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_oauth_token_endpoint_string_vec(
&mut self,
item: Vec<String>
) -> Result<()>
[src]
pub fn set_oauth_token_endpoint_string_vec(
&mut self,
item: Vec<String>
) -> Result<()>
Set many values in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
pub fn provide_client_key_string(&self) -> Result<String>
[src]
pub fn provide_client_key_string(&self) -> Result<String>
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_provide_client_key_string(&mut self, item: String) -> Result<()>
[src]
pub fn set_provide_client_key_string(&mut self, item: String) -> Result<()>
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
pub fn provide_client_key_string_vec(&self) -> Result<Vec<String>>
[src]
pub fn provide_client_key_string_vec(&self) -> Result<Vec<String>>
Retrieve many values from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_provide_client_key_string_vec(
&mut self,
item: Vec<String>
) -> Result<()>
[src]
pub fn set_provide_client_key_string_vec(
&mut self,
item: Vec<String>
) -> Result<()>
Set many values in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
pub fn sign_client_key_string(&self) -> Result<String>
[src]
pub fn sign_client_key_string(&self) -> Result<String>
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_sign_client_key_string(&mut self, item: String) -> Result<()>
[src]
pub fn set_sign_client_key_string(&mut self, item: String) -> Result<()>
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
pub fn sign_client_key_string_vec(&self) -> Result<Vec<String>>
[src]
pub fn sign_client_key_string_vec(&self) -> Result<Vec<String>>
Retrieve many values from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_sign_client_key_string_vec(
&mut self,
item: Vec<String>
) -> Result<()>
[src]
pub fn set_sign_client_key_string_vec(
&mut self,
item: Vec<String>
) -> Result<()>
Set many values in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Retrieve many values from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
Set many values in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Trait Implementations
impl Clone for Endpoint
[src]
impl Clone for Endpoint
fn clone(&self) -> Endpoint
[src]
fn clone(&self) -> Endpoint
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Endpoint
[src]
impl Debug for Endpoint
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for Endpoint
[src]
impl Default for Endpoint