Skip to content

Accessing UserSession keyring #57

@Nemo157

Description

@Nemo157

I may be confused about what Keyring::attach is for, but it seems like using it to access the UserSession keyring fails

let mut session_keyring  = Keyring::attach(SpecialKeyring::UserSession)?;
let mut key = session_keyring.add_key::<User, _, _>(AUTH_TOKEN_KEY, auth_token.expose_secret().as_bytes())?;

gives back Permission denied at the add_key call, but if I access directly through the special keyring id it works fine

let mut session_keyring  = unsafe { Keyring::new(SpecialKeyring::UserSession.serial()) };
let mut key = session_keyring.add_key::<User, _, _>(AUTH_TOKEN_KEY, auth_token.expose_secret().as_bytes())?;

(same happens with session_keyring.search_for_key)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions