Error response enhancements, CoreID auth client backend
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {Injectable, Inject} from '../../di'
|
||||
import {ErrorWithContext} from '../../util'
|
||||
import {ErrorWithContext, Safe} from '../../util'
|
||||
import {Request} from '../lifecycle/Request'
|
||||
|
||||
/**
|
||||
@@ -60,4 +60,9 @@ export abstract class Session {
|
||||
|
||||
/** Remove a key from the session data. */
|
||||
public abstract forget(key: string): void
|
||||
|
||||
/** Load a key from the session as a Safe value. */
|
||||
public safe(key: string): Safe {
|
||||
return new Safe(this.get(key))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user