Documentation
Overview ¶
Package bitwarden exposes an API compatible with the Bitwarden Open-Soure apps.
Index ¶
- func ChangeSecurityStamp(c echo.Context) error
- func CreateCipher(c echo.Context) error
- func CreateFolder(c echo.Context) error
- func CreateSharedCipher(c echo.Context) error
- func DeleteCipher(c echo.Context) error
- func DeleteFolder(c echo.Context) error
- func GetCipher(c echo.Context) error
- func GetCozy(c echo.Context) error
- func GetDomains(c echo.Context) error
- func GetFolder(c echo.Context) error
- func GetIcon(c echo.Context) error
- func GetProfile(c echo.Context) error
- func GetRevisionDate(c echo.Context) error
- func GetToken(c echo.Context) error
- func ImportCiphers(c echo.Context) error
- func ListCiphers(c echo.Context) error
- func ListFolders(c echo.Context) error
- func NegotiateHub(c echo.Context) error
- func Prelogin(c echo.Context) error
- func RenameFolder(c echo.Context) error
- func RestoreCipher(c echo.Context) error
- func Routes(router *echo.Group)
- func SendHint(c echo.Context) error
- func SetKeyPair(c echo.Context) error
- func ShareCipher(c echo.Context) error
- func SoftDeleteCipher(c echo.Context) error
- func Sync(c echo.Context) error
- func UpdateCipher(c echo.Context) error
- func UpdateDomains(c echo.Context) error
- func UpdateProfile(c echo.Context) error
- func WebsocketHub(c echo.Context) error
- type AccessTokenReponse
Constants ¶
Variables ¶
Functions ¶
func ChangeSecurityStamp ¶
ChangeSecurityStamp is used by the client to change the security stamp, which will deconnect all the clients.
func CreateCipher ¶
CreateCipher is the handler for creating a cipher: login, secure note, etc.
func CreateFolder ¶
CreateFolder is the route to add a folder via the Bitwarden API.
func CreateSharedCipher ¶
CreateSharedCipher is the handler for creating a shared cipher.
func DeleteCipher ¶
DeleteCipher is the handler for the route to delete a cipher.
func DeleteFolder ¶
DeleteFolder is the handler for the route to delete a folder.
func GetCozy ¶
GetCozy returns the information about the cozy organization, including the organization key.
func GetDomains ¶
GetDomains is the handler for listing the domains in settings.
func GetProfile ¶
GetProfile is the handler for the route to get profile information.
func GetRevisionDate ¶
GetRevisionDate returns the date of the last synchronization (as a number of milliseconds).
func GetToken ¶
GetToken is used by the clients to get an access token. There are two supported grant types: password and refresh_token. Password is used the first time to register the client, and gets the initial credentials, by sending a hash of the user password. Refresh token is used later to get a new access token by sending the refresh token.
func ImportCiphers ¶
ImportCiphers is used to import ciphers and folders in bulk.
func ListCiphers ¶
ListCiphers is the route for listing the Bitwarden ciphers. No pagination yet.
func ListFolders ¶
ListFolders is the route for listing the Bitwarden folders. No pagination yet.
func NegotiateHub ¶
NegotiateHub is the handler for negotiating between the server and the client which transport to use for bitwarden notifications. Currently, only websocket is supported.
func Prelogin ¶
Prelogin tells to the client how many KDF iterations it must apply when hashing the master password.
func RenameFolder ¶
RenameFolder is the route for changing the (encrypted) name of a folder.
func RestoreCipher ¶
RestoreCipher is the handler for the route to restore a soft-deleted cipher. See https://github.com/bitwarden/server/pull/684 for the bitwarden implementation
func SendHint ¶
SendHint is the handler for sending the hint when the user has forgot their password.
func SetKeyPair ¶
SetKeyPair is the handler for setting the key pair: public and private keys.
func ShareCipher ¶
ShareCipher is used to share a cipher with an organization.
func SoftDeleteCipher ¶
SoftDeleteCipher is the handler for the route to soft delete a cipher. See https://github.com/bitwarden/server/pull/684 for the bitwarden implementation
func Sync ¶
Sync is the handler for the main endpoint of the bitwarden API. It is used by the client as a one-way sync: it fetches all objects from the server to update its local database.
func UpdateCipher ¶
UpdateCipher is the route for changing a cipher.
func UpdateDomains ¶
UpdateDomains is the handler for updating the domains in settings.
func UpdateProfile ¶
UpdateProfile is the handler for the route to update the profile. Currently, only the hint for the master password can be changed.
func WebsocketHub ¶
WebsocketHub is the websocket handler for the hub to send notifications in real-time for bitwarden stuff.
Types ¶
type AccessTokenReponse ¶
type AccessTokenReponse struct { ClientID string `json:"client_id,omitempty"` RegToken string `json:"registration_access_token,omitempty"` Type string `json:"token_type"` ExpiresIn int `json:"expires_in"` Access string `json:"access_token"` Refresh string `json:"refresh_token"` Key string `json:"Key"` }
AccessTokenReponse is the stuct used for serializing to JSON the response for an access token.